websocket-sharp
websocket-sharp copied to clipboard
Fixed unhandled exception when cancel is called on the CancellationToken
Hi, first of all great work!
Code to reproduce:
var cts = new CancellationTokenSource();
var websocket = new WebSocket("ws://1.2.3.4/dummy", cts.Token);
// After any moment in time
cts.Cancel(); // this causes an uncaught TaskCancelledException
Which led me to the async void lambda expression ;)
Any update on this pull request?