Skip to content

Commit

Permalink
server-test: changed rethrow policies
Browse files Browse the repository at this point in the history
Since we start using non-trivial attenuation, we can expect IO
/ multiplexer errors.  They should not terminate a simulation.
  • Loading branch information
coot committed Oct 14, 2021
1 parent e8f2e56 commit a6c841a
Showing 1 changed file with 7 additions and 5 deletions.
Expand Up @@ -432,19 +432,21 @@ debugMuxErrorRethrowPolicy =
mkRethrowPolicy $
\_ MuxError { errorType } ->
case errorType of
MuxIOException _ -> ShutdownPeer
MuxBearerClosed -> ShutdownPeer
_ -> ShutdownNode
MuxIOException _ -> ShutdownPeer
MuxBearerClosed -> ShutdownPeer
MuxSDUReadTimeout -> ShutdownPeer
MuxSDUWriteTimeout -> ShutdownPeer
_ -> ShutdownNode

debugMuxRuntimeErrorRethrowPolicy :: RethrowPolicy
debugMuxRuntimeErrorRethrowPolicy =
mkRethrowPolicy $
\_ (_ :: MuxRuntimeError) -> ShutdownNode
\_ (_ :: MuxRuntimeError) -> ShutdownPeer

debugIOErrorRethrowPolicy :: RethrowPolicy
debugIOErrorRethrowPolicy =
mkRethrowPolicy $
\_ (_ :: IOError) -> ShutdownNode
\_ (_ :: IOError) -> ShutdownPeer


assertRethrowPolicy :: RethrowPolicy
Expand Down

0 comments on commit a6c841a

Please sign in to comment.