Skip to content

Commit

Permalink
removing the unnecessary withMVar (#327).
Browse files Browse the repository at this point in the history
mkWeakMVar is not used anymore. So, this code is not necessary.
  • Loading branch information
kazu-yamamoto authored and eborden committed Jun 25, 2018
1 parent 7c4f637 commit 6ee1901
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Network/Socket.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,8 @@ accept :: Socket -- Queue Socket
-> IO (Socket, -- Readable Socket
SockAddr) -- Peer details

accept sock@(MkSocket s family stype protocol status) = withMVar status $ \currentStatus -> do
accept sock@(MkSocket s family stype protocol status) = do
currentStatus <- readMVar status
if not $ isAcceptable family stype currentStatus
then
ioError $ userError $
Expand Down

0 comments on commit 6ee1901

Please sign in to comment.