dart-lang / web_socket_channel

StreamChannel wrappers for WebSockets.
https://pub.dev/packages/web_socket_channel
BSD 3-Clause "New" or "Revised" License
425 stars 112 forks source link

3.0.1 No longer sets closeCode on sink.close #383

Open hagen00 opened 1 month ago

hagen00 commented 1 month ago

In version 3.0.1 closeCode is no longer set. I have reproduced as follows:

Code to reproduce

// in button onPressed:
await channel?.sink.close(status.normalClosure); 

// in onDone callback
print('Close Code: ${channel?.closeCode}');

Results: Using version 2.4.5 the closeCode prints correctly. Using version 3.0.1, the closeCode is null