Closed felixschlegel closed 1 year ago
Hey @Lukasa ,
I have implemented your requested changes and added the buffering of closeOutput
when we are still in state = .handshaking / .additionalVerification
.
I still have a couple of open questions for this PR:
scheduledShutdown
for close(mode: .output)
(see the normal close mode for reference)ChannelHandler
does not support close(mode: .output)
? At the moment we just invoke context.close(mode: .output)
hoping for the next ChannelHandler
not to failBest regards, -Felix
@swift-server-bot add to allowlist
should we also support scheduledShutdown for close(mode: .output) (see the normal close mode for reference)
No, scheduled shutdown is waiting for us to get a CLOSE_NOTIFY
from the remote peer. In this mode, we don't expect one.
what if the downstream ChannelHandler does not support close(mode: .output)?
Then the partial close fails and the user should upgrade to full close.
@swift-server-bot test this please
@swift-server-bot test this please
Motivation
If NIOSSLHandler receives
close(mode: .output) or close(mode: .input)
, it ignores them, optionally failing their promises. This is weird behaviour. It should do better.Modifications
NIOSSLHandler.close(mode: .output)
NIOSSLHandler.close(mode: .output)
NIOSSLHandler
when used as a server withChannelOptions.Types.AllowRemoteHalfClosureOption
enabled