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
For version 3.0.0, when calling close with a status argument, it throws an exception. Only status.normalClosure which is 1000 works. The rest of the status code seems like not being mapped into the 3000-4999 range which can cause the exception to be thrown.
Code snippet
var channel = IOWebSocketChannel.connect(...);
...
channel.sink.close(status.goingAway);
Exception
Invalid argument(s): Invalid argument: 1001, close code must be 1000 or in the range 3000-4999
package:web_socket/src/utils.dart 10:5 checkCloseCode
package:web_socket/src/io_web_socket.dart 108:5 IOWebSocket.close
package:web_socket_channel/adapter_web_socket_channel.dart 112:27 new AdapterWebSocketChannel.<fn>.<fn>
package:stream_channel _GuaranteeSink.close
package:async/src/delegate/stream_sink.dart 47:27 DelegatingStreamSink.close
package:web_socket_channel/adapter_web_socket_channel.dart 147:18 _WebSocketSink.close
The text was updated successfully, but these errors were encountered:
For version 3.0.0, when calling close with a status argument, it throws an exception. Only
status.normalClosure
which is 1000 works. The rest of the status code seems like not being mapped into the 3000-4999 range which can cause the exception to be thrown.Code snippet
Exception
The text was updated successfully, but these errors were encountered: