Commit f500a2fe authored by AndreasVoellmy's avatar AndreasVoellmy Committed by tibbe

Update closeFd_ to avoid unnecessary backend modifications.

This makes closeFd follow the patten of closeFd_.
parent 1025c8ff
......@@ -369,8 +369,9 @@ closeFd_ mgr oldMap fd = do
(Nothing, _) -> return oldMap
(Just fds, !newMap) -> do
let oldEvs = eventsOf fds
I.modifyFd (emBackend mgr) fd oldEvs mempty
when (oldEvs /= mempty) $ wakeManager mgr
when (oldEvs /= mempty) $ do
I.modifyFd (emBackend mgr) fd oldEvs mempty
wakeManager mgr
forM_ fds $ \(FdData reg ev cb) -> cb reg (ev `mappend` evtClose)
return newMap
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment