socket.io-client-csharp icon indicating copy to clipboard operation
socket.io-client-csharp copied to clipboard

Canceling the ConnectAsync() with a CancellationToken

Open Aspher0 opened this issue 9 months ago • 5 comments

Hello dog 😄

First of all, thanks for the project, it helped me a lot. However, I'm having struggle to cancel an ongoing connection attempt initiated with ConnectAsync, would it be possible to maybe add an overload to the ConnectAsync() method with a CancellationToken parameter so we can cancel it anytime please ? I tried forking the project but I ended up breaking everything, I'm sadly not that talented ahah

I tried disposing the client in both 3.1.1 version and 3.0.8 as someone had suggested in the issues, but no luck, it will keep trying to connect even after disposing.

Thanks in advance for your answer!

Aspher0 avatar May 19 '24 16:05 Aspher0