Fix TcpConnection error handling
`resumeReading` can fail, and in that case will `become(unregistering)`. Previously `become(connected(info))` would interfere with that. Likely fixes #30509 and #30474. #30435 looks similar but might be something different.
This commit is contained in:
parent
a3447b4340
commit
03d759b249
1 changed files with 3 additions and 2 deletions
|
|
@ -74,11 +74,12 @@ private[io] abstract class TcpConnection(val tcp: TcpExt, val channel: SocketCha
|
|||
|
||||
val info = ConnectionInfo(registration, handler, keepOpenOnPeerClosed, useResumeWriting)
|
||||
|
||||
context.setReceiveTimeout(Duration.Undefined)
|
||||
context.become(connected(info))
|
||||
|
||||
// if we are in push mode or already have resumed reading in pullMode while waiting for Register
|
||||
// then register OP_READ interest
|
||||
if (!pullMode || (/*pullMode && */ !readingSuspended)) resumeReading(info, None)
|
||||
context.setReceiveTimeout(Duration.Undefined)
|
||||
context.become(connected(info))
|
||||
|
||||
case ResumeReading =>
|
||||
readingSuspended = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue