parent
65ccada280
commit
63aefb0b5e
1 changed files with 8 additions and 3 deletions
|
|
@ -670,8 +670,13 @@ import akka.stream.snapshot._
|
|||
connection.portState match {
|
||||
case InReady => ConnectionSnapshot.ShouldPull
|
||||
case OutReady => ConnectionSnapshot.ShouldPush
|
||||
case x if (x | InClosed | OutClosed) == (InClosed | OutClosed) =>
|
||||
case x if (x & (InClosed | OutClosed)) == (InClosed | OutClosed) =>
|
||||
// At least one side of the connection is closed: we show it as closed
|
||||
ConnectionSnapshot.Closed
|
||||
case _ =>
|
||||
// This should not be possible: connection alive and both push and pull enqueued but not received
|
||||
throw new IllegalStateException(s"Unexpected connection state for $connection: ${connection.portState}")
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue