Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
inbound-governor: cleanup
  • Loading branch information
coot committed May 12, 2021
1 parent 210c3c8 commit 6f64fdc
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -200,7 +200,7 @@ firstPeerPromotedToWarm InboundGovernorState { igsConnections } =
-> STM m (ConnectionId peerAddr)
-> STM m (ConnectionId peerAddr)
fn connId =
\(_miniProtcolNum, miniProtocolDir)
\(_miniProtocolNum, miniProtocolDir)
miniProtocolStatus
inner ->
case miniProtocolDir of
Expand Down Expand Up @@ -320,12 +320,12 @@ firstPeerDemotedToCold InboundGovernorState { igsConnections } =
(Mux.miniProtocolStateMap csMux)
) $> WaitIdleRemote connId

-- Possible for both 'Unidirectional' and 'Duplex' connections; In
-- non-compat mode wait for first of:
-- Possible for both 'Unidirectional' and 'Duplex' connections. Wait
-- for first of:
--
-- 1. timeout, in which case we will transition to 'RemoteCold',
-- 2. one of mini-protocols to wake up, in which case we transition
-- back to 'RemoteEstablished';
-- to 'RemoteWarm';
-- 3. mux stopped;
--
-- This is done to solve a situation where one of the mini-protocols
Expand All @@ -346,7 +346,8 @@ firstPeerDemotedToCold InboundGovernorState { igsConnections } =
(miniProtocolStatus >>= \case
StatusIdle -> retry
StatusStartOnDemand -> retry
StatusRunning -> return (AwakeRemote connId))
StatusRunning -> return (AwakeRemote connId)
)
<|> inner
)
(
Expand Down

0 comments on commit 6f64fdc

Please sign in to comment.