diff options
Diffstat (limited to 'dht/src/Network/QueryResponse/TCP.hs')
-rw-r--r-- | dht/src/Network/QueryResponse/TCP.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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 | |||
168 | 168 | ||
169 | closeAll :: TCPCache (SessionProtocol x y) -> StreamHandshake addr x y -> IO () | 169 | closeAll :: TCPCache (SessionProtocol x y) -> StreamHandshake addr x y -> IO () |
170 | closeAll tcpcache stream = do | 170 | closeAll tcpcache stream = do |
171 | dput XTCP "TCP.closeAll called." | ||
171 | cache <- atomically $ swapTVar (lru tcpcache) MM.empty | 172 | cache <- atomically $ swapTVar (lru tcpcache) MM.empty |
172 | forM_ (MM.toList cache) $ \(MM.Binding (TCPAddress addr) r tm) -> do | 173 | forM_ (MM.toList cache) $ \(MM.Binding (TCPAddress addr) r tm) -> do |
173 | killSession r | 174 | killSession r |
@@ -188,5 +189,5 @@ tcpTransport maxcon stream = do | |||
188 | mapM_ ($ y) msock | 189 | mapM_ ($ y) msock |
189 | `catchIOError` \e -> dput XTCP $ "TCP-send: " ++ show e | 190 | `catchIOError` \e -> dput XTCP $ "TCP-send: " ++ show e |
190 | labelThread t "tcp-send" | 191 | labelThread t "tcp-send" |
191 | , closeTransport = closeAll tcpcache stream | 192 | , closeTransport = closeAll tcpcache stream >> putMVar msgvar Nothing |
192 | } | 193 | } |