Merge pull request #30513 from raboof/fix-tcp-connection-error-handling

Fix TcpConnection error handling
This commit is contained in:
Patrik Nordwall 2021-08-11 13:29:29 +02:00 committed by GitHub
commit 0b59ba935f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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