diff options
Diffstat (limited to 'server/src/Network/QueryResponse/TCP.hs')
-rw-r--r-- | server/src/Network/QueryResponse/TCP.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/Network/QueryResponse/TCP.hs b/server/src/Network/QueryResponse/TCP.hs index 8b1b432b..24aacd98 100644 --- a/server/src/Network/QueryResponse/TCP.hs +++ b/server/src/Network/QueryResponse/TCP.hs | |||
@@ -213,8 +213,9 @@ tcpTransport maxcon stream = do | |||
213 | msgvar <- atomically newEmptyTMVar | 213 | msgvar <- atomically newEmptyTMVar |
214 | tcpcache <- atomically $ (`TCPCache` maxcon) <$> newTVar (MM.empty) | 214 | tcpcache <- atomically $ (`TCPCache` maxcon) <$> newTVar (MM.empty) |
215 | return $ (,) tcpcache Transport | 215 | return $ (,) tcpcache Transport |
216 | { awaitMessage = \f -> takeTMVar msgvar >>= \x -> return $ do | 216 | { awaitMessage = do |
217 | f x `catchIOError` (\e -> dput XTCP ("TCP transport stopped. " ++ show e) >> f Terminated) | 217 | x <- takeTMVar msgvar |
218 | return (x, return ()) | ||
218 | , sendMessage = \addr (bDoCon,y) -> do | 219 | , sendMessage = \addr (bDoCon,y) -> do |
219 | void . forkLabeled "tcp-send" $ do | 220 | void . forkLabeled "tcp-send" $ do |
220 | msock <- acquireConnection msgvar tcpcache stream addr bDoCon | 221 | msock <- acquireConnection msgvar tcpcache stream addr bDoCon |