git.iko.soy/distributed-process
on master help sign in
Fix bug during move from data-lens->data-accessor
commit7926074ca295810dc3bdc4077ea5c3b1bde494f0 authorEdsko de Vries <edsko@edsko.net> dateWed 16 May 2012, 14:43 (14 years ago) parent3701052
1 file changed+2−2
network-transport/src/Network/Transport/TCP.hs+2−2
network-transport/src/Network/Transport/TCP.hs+2−2
@@ -399,7 +399,7 @@ apiClose theirEndPoint connId connAlive = void . tryIO $ do
399399 then do
400400 writeIORef connAlive False
401401 sendOn vst [encodeInt32 CloseConnection, encodeInt32 connId]
402− return (RemoteEndPointValid . (remoteOutgoing ^: (+ 1)) $ vst)
402+ return (RemoteEndPointValid . (remoteOutgoing ^: (\x -> x - 1)) $ vst)
403403 else
404404 return (RemoteEndPointValid vst)
405405 RemoteEndPointClosed -> do
@@ -598,7 +598,7 @@ requestConnectionTo ourEndPoint theirAddress = go
598598 let failureHandler :: IOException -> IO b
599599 failureHandler err = do
600600 modifyMVar_ theirState $ \(RemoteEndPointValid ep) ->
601− return (RemoteEndPointValid . (remoteOutgoing ^: (+ 1)) $ ep)
601+ return (RemoteEndPointValid . (remoteOutgoing ^: (\x -> x - 1)) $ ep)
602602 -- TODO: should we call closeIfUnused here?
603603 throw $ TransportError ConnectFailed (show err)
604604