Skip to content

Commit

Permalink
sign on synchronously, fixes a race
Browse files Browse the repository at this point in the history
  • Loading branch information
sorear committed Jan 11, 2007
1 parent cb38d69 commit 58cf11f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plugin/IRC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ online tag hostn portnum nickn ui = do
signalQSem sem2
catchError (addServer tag $ io . sendMsg tag sock sem1 sem2)
(\err -> io (hClose sock) >> throwError err)
lift $ liftLB forkIO $ catchError (do ircSignOn hostn (Nick tag nickn) ui
readerLoop tag nickn sock)
lift $ ircSignOn hostn (Nick tag nickn) ui
lift $ liftLB forkIO $ catchError (readerLoop tag nickn sock)
(\e -> do io $ hPutStrLn stderr $ "irc[" ++ tag ++ "] error: " ++ show e
remServer tag)
return ()
Expand Down

0 comments on commit 58cf11f

Please sign in to comment.