stream: Improve half-closing of outgoing TCP connections (#28624)
Notably fixes the case where upstream finished before the connection was successfully established, and avoids RSTing the incoming stream when the outgoing stream is done (which is now possible due to the cancellation reason being propagated).
This commit is contained in:
parent
cff15cf40d
commit
8a354ec3f0
3 changed files with 75 additions and 31 deletions
|
|
@ -142,6 +142,7 @@ private[io] abstract class TcpConnection(val tcp: TcpExt, val channel: SocketCha
|
|||
case SuspendReading => suspendReading(info)
|
||||
case ResumeReading => resumeReading(info)
|
||||
case ChannelReadable => doRead(info, closeCommander)
|
||||
case Close => doCloseConnection(info.handler, closeCommander, Close.event)
|
||||
case Abort => handleClose(info, Some(sender()), Aborted)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue