Skip to content

Commit

Permalink
Lower the time we refuse incomming connections for suspended peers
Browse files Browse the repository at this point in the history
In p2p mode the same port number is used which means that p2p nodes
gets tangled up in the suspend peer logic.
P2P nodes will reconnect after 10s, by lowering the producer
suspensiontime from 20s to 1s p2p downstream peers aren't worse of than
non-p2p nodes.
  • Loading branch information
karknu authored and coot committed Mar 24, 2023
1 parent 2856507 commit 6a8a309
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ouroboros-network/src/Ouroboros/Network/NodeToNode.hs
Expand Up @@ -587,12 +587,12 @@ remoteNetworkErrorPolicy = ErrorPolicies {
-- 'responder'. If a 'responder' throws 'MuxError' we
-- might not want to shutdown the consumer (which is
-- using different connection), as we do below:
MuxBearerClosed -> Just (SuspendPeer shortDelay shortDelay)
MuxIOException{} -> Just (SuspendPeer shortDelay shortDelay)
MuxSDUReadTimeout -> Just (SuspendPeer shortDelay shortDelay)
MuxSDUWriteTimeout -> Just (SuspendPeer shortDelay shortDelay)
MuxShutdown {} -> Just (SuspendPeer shortDelay shortDelay)
MuxCleanShutdown -> Just (SuspendPeer shortDelay shortDelay)
MuxBearerClosed -> Just (SuspendPeer veryShortDelay shortDelay)
MuxIOException{} -> Just (SuspendPeer veryShortDelay shortDelay)
MuxSDUReadTimeout -> Just (SuspendPeer veryShortDelay shortDelay)
MuxSDUWriteTimeout -> Just (SuspendPeer veryShortDelay shortDelay)
MuxShutdown {} -> Just (SuspendPeer veryShortDelay shortDelay)
MuxCleanShutdown -> Just (SuspendPeer veryShortDelay shortDelay)

, ErrorPolicy
$ \(e :: MuxRuntimeError)
Expand Down

0 comments on commit 6a8a309

Please sign in to comment.