git.iko.soy/distributed-process
on master help sign in
Fix bug during move from data-lens->data-accessor
7926074Edsko de Vries
network-transport/src/Network/Transport/TCP.hs+2−2
@@ -399,7 +399,7 @@ apiClose theirEndPoint connId connAlive = void . tryIO $ do
399 then do
399 then do
400 writeIORef connAlive False
400 writeIORef connAlive False
401 sendOn vst [encodeInt32 CloseConnection, encodeInt32 connId]
401 sendOn vst [encodeInt32 CloseConnection, encodeInt32 connId]
402− return (RemoteEndPointValid . (remoteOutgoing ^: (+ 1)) $ vst)
402+ return (RemoteEndPointValid . (remoteOutgoing ^: (\x -> x - 1)) $ vst)
403 else
403 else
404 return (RemoteEndPointValid vst)
404 return (RemoteEndPointValid vst)
405 RemoteEndPointClosed -> do
405 RemoteEndPointClosed -> do
@@ -598,7 +598,7 @@ requestConnectionTo ourEndPoint theirAddress = go
598 let failureHandler :: IOException -> IO b
598 let failureHandler :: IOException -> IO b
599 failureHandler err = do
599 failureHandler err = do
600 modifyMVar_ theirState $ \(RemoteEndPointValid ep) ->
600 modifyMVar_ theirState $ \(RemoteEndPointValid ep) ->
601− return (RemoteEndPointValid . (remoteOutgoing ^: (+ 1)) $ ep)
601+ return (RemoteEndPointValid . (remoteOutgoing ^: (\x -> x - 1)) $ ep)
602 -- TODO: should we call closeIfUnused here?
602 -- TODO: should we call closeIfUnused here?
603 throw $ TransportError ConnectFailed (show err)
603 throw $ TransportError ConnectFailed (show err)
604
604