From 654e9cf9b551821360c5dc3683b9db7a838ad5a7 Mon Sep 17 00:00:00 2001 From: Armando Santos Date: Mon, 10 Jan 2022 17:45:42 +0000 Subject: [PATCH] Refactored inboundGovernorLoop error handling --- .../src/Ouroboros/Network/InboundGovernor.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ouroboros-network-framework/src/Ouroboros/Network/InboundGovernor.hs b/ouroboros-network-framework/src/Ouroboros/Network/InboundGovernor.hs index 047b950ad64..2cd90999a4a 100644 --- a/ouroboros-network-framework/src/Ouroboros/Network/InboundGovernor.hs +++ b/ouroboros-network-framework/src/Ouroboros/Network/InboundGovernor.hs @@ -112,9 +112,10 @@ inboundGovernor trTracer tracer serverControlChannel inboundIdleTimeout (\(e :: SomeAsyncException) -> do state <- atomically $ readTVar st _ <- Map.traverseWithKey - (\connId _ -> + (\connId _ -> do + let state' = unregisterConnection connId state traceWith trTracer - (mkRemoteTransitionTrace connId state emptyState) + (mkRemoteTransitionTrace connId state state') ) (igsConnections state)