From e89e7b8415aa222088b091d24c88f635fc1ba9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Fri, 13 Mar 2026 21:10:50 +0100 Subject: Signal closure to open input streams when dropping connection --- src/Erebos/Network/Protocol.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Erebos/Network/Protocol.hs b/src/Erebos/Network/Protocol.hs index 34f1163..c0dff4b 100644 --- a/src/Erebos/Network/Protocol.hs +++ b/src/Erebos/Network/Protocol.hs @@ -281,6 +281,8 @@ connClose conn@Connection {..} = do writeTVar cChannel ChannelClosed writeTVar gConnections . filter (/=conn) =<< readTVar gConnections writeFlow cDataInternal Nothing + streams <- readTVar cInStreams + forM_ streams $ \( _, s ) -> writeFlow (sFlowIn s) (StreamClosed 0) connAddWriteStream :: Connection addr -> STM (Either String (TransportHeaderItem, RawStreamWriter, IO ())) connAddWriteStream conn@Connection {..} = do -- cgit v1.2.3