From c25b96d0665f9bd6c28245c811cbc7c57d0b9694 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Fri, 18 Oct 2019 06:05:14 -0400 Subject: Clean-up relay-client transport. --- dht/src/Network/QueryResponse/TCP.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dht/src') diff --git a/dht/src/Network/QueryResponse/TCP.hs b/dht/src/Network/QueryResponse/TCP.hs index bad61727..de6e1eb7 100644 --- a/dht/src/Network/QueryResponse/TCP.hs +++ b/dht/src/Network/QueryResponse/TCP.hs @@ -168,6 +168,7 @@ acquireConnection mvar tcpcache stream addr bDoCon = do closeAll :: TCPCache (SessionProtocol x y) -> StreamHandshake addr x y -> IO () closeAll tcpcache stream = do + dput XTCP "TCP.closeAll called." cache <- atomically $ swapTVar (lru tcpcache) MM.empty forM_ (MM.toList cache) $ \(MM.Binding (TCPAddress addr) r tm) -> do killSession r @@ -188,5 +189,5 @@ tcpTransport maxcon stream = do mapM_ ($ y) msock `catchIOError` \e -> dput XTCP $ "TCP-send: " ++ show e labelThread t "tcp-send" - , closeTransport = closeAll tcpcache stream + , closeTransport = closeAll tcpcache stream >> putMVar msgvar Nothing } -- cgit v1.2.3