Closed weissi closed 6 years ago
Calling write on a ServerSocketChannel should fail the promise with ChannelError.unsupportedOperation.
ServerSocketChannel
ChannelError.unsupportedOperation
It fatal errors with a bogus message that suggests the subclass (which is ServerSocketChannel must implement a method)
Channel
let bootstrap = ServerBootstrap(group: group) .childChannelOption(ChannelOptions.socket(SocketOptionLevel(SOL_SOCKET), SO_REUSEADDR), value: 1) defer { try! group.syncShutdownGracefully() } try! bootstrap.bind(host: "127.0.0.1", port: 12345).wait().write(NIOAny("foo bar")).wait()
then connect to port 12345
any
swift --version && uname -a
This was fixed
Expected behavior
Calling write on a
ServerSocketChannel
should fail the promise withChannelError.unsupportedOperation
.Actual behavior
It fatal errors with a bogus message that suggests the subclass (which is
ServerSocketChannel
must implement a method)Steps to reproduce
Channel
returned (which is aServerSocketChannel
)If possible, minimal yet complete reproducer code (or URL to code)
then connect to port 12345
SwiftNIO version/commit hash
any
Swift & OS version (output of
swift --version && uname -a
)any