You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a server setup with WebSocket upgrade using NIOTypedWebSocketServerUpgrader and allowRemoteHalfClosure set to true on the childChannel. If I open a connection to this server and close it immediately without sending any data the negotiation future returned from configureUpgradableHTTPServerPipeline on the server should throw a connection closed error.
Actual behavior
The negotiation future never completes leaving the child channel dangling.
If allowRemoteHalfClosure is set to false on the server then the negotiation future throws a inappropriateOperationForState error which isn't ideal but at least I can catch that the client has closed the connection
Steps to reproduce
Using the NIOWebSocketServer.swift example
Add .childChannelOption(ChannelOptions.allowRemoteHalfClosure, value: true) before bind call in run
Use a client to connect and close connection immediately
Expected behavior
Given a server setup with WebSocket upgrade using
NIOTypedWebSocketServerUpgrader
andallowRemoteHalfClosure
set to true on the childChannel. If I open a connection to this server and close it immediately without sending any data the negotiation future returned fromconfigureUpgradableHTTPServerPipeline
on the server should throw a connection closed error.Actual behavior
The negotiation future never completes leaving the child channel dangling.
If
allowRemoteHalfClosure
is set to false on the server then the negotiation future throws ainappropriateOperationForState
error which isn't ideal but at least I can catch that the client has closed the connectionSteps to reproduce
.childChannelOption(ChannelOptions.allowRemoteHalfClosure, value: true)
beforebind
call inrun
SwiftNIO version/commit hash
e5a216b
System & version information
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: x86_64-apple-macosx14.0
The text was updated successfully, but these errors were encountered: