jchristn/WatsonWebsocket

Use the cancelation token

Closed this issue · 4 comments

Just wondering why you're not using the if expression bellow in the actual while?

if (cancelToken.IsCancellationRequested) break;

Great point, that could certainly be changed :) want to submit a PR?

The code needs a lot of fixing my friend, this is just one that I spotted today. Great work in getting it all together but it needs to go over a big deal of refactoring. Also, #region and all those comments are not really a thing.

Yeah, I mainly use regions just to give myself an easy way to collapse small and large sections, primarily to allow me to focus. Happy to take a PR with your improvements!