Skip to content

Commit

Permalink
Log TerminatingSt->TerminatedSt in the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
bolt12 committed Jul 29, 2021
1 parent da6f3fe commit 336796f
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -661,11 +661,10 @@ withConnectionManager ConnectionManagerArguments {
return ( Map.delete peerAddr state
, Left (Known (TerminatedState Nothing))
)
Here (connVar, transition) -> do
traceWith trTracer transition
Here connVarAndTransition -> do
close cmSnocket socket
return ( state
, Right connVar
, Right connVarAndTransition
)

case mConnVar of
Expand All @@ -680,7 +679,7 @@ withConnectionManager ConnectionManagerArguments {
, toState = Unknown
})
Left _ -> error "Impossible happened"
Right connVar ->
Right (connVar, transition) ->
do traceWith tracer (TrConnectionTimeWait connId)
when (cmTimeWaitTimeout > 0) $
unmask (threadDelay cmTimeWaitTimeout)
Expand All @@ -690,6 +689,8 @@ withConnectionManager ConnectionManagerArguments {
-- - handshake negotiation; or
-- - `Terminate: TerminatingState → TerminatedState` transition.
traceWith tracer (TrConnectionTimeWaitDone connId)
traceWith trTracer transition
-- ^ TerminatingState -> TerminatedState transition
trs <- atomically $ do
-- We have to be careful when deleting it from
-- 'ConnectionManagerState'.
Expand Down

0 comments on commit 336796f

Please sign in to comment.