Skip to content
Snippets Groups Projects
Commit d058e788 authored by Jens Nolte's avatar Jens Nolte
Browse files

Move a comment to the right place

parent a9bc5add
No related branches found
No related tags found
No related merge requests found
......@@ -76,9 +76,9 @@ connectTCP host port = do
-- The 'raceConnections'-async is 'link'ed to this thread, so 'readMVar' is interrupted when all connection attempts fail
sock <-
(withAsync (interruptible raceConnections) (link >=> const (readMVar sockMVar))
-- As soon as we have an open connection, stop spawning more connections
`finally` (mapM_ (cancel . snd) =<< readMVar connectTasksMVar))
`onException` (mapM_ Socket.close =<< tryTakeMVar sockMVar)
-- As soon as we have an open connection, stop spawning more connections
pure sock
where
hints :: Socket.AddrInfo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment