jchristn/WatsonWebsocket

Dispose Method Makes CPU %100 and hangs

Closed this issue · 5 comments

etempm commented

Hi,

WcServer.Stop();
WcServer.Dispose();

If I have more than one client connected, Dispose method makes cpu usage %100 and hangs. Maybe loop in that?

etempm commented

I removed Stop method, and worked.

Hi @etempm thanks for letting me know. To make sure I understand, when you call Stop followed by Dispose, the CPU spikes and hangs, but, when you only call Dispose, it does not?

(Re-opening in case there's a fix that I need to apply)

I just tried to replicate this using the Test.Server and Test.Client projects. I was unable to get CPU to spike on Stop and Dispose or just Dispose alone.
image

Please let me know if you are able to reliably reproduce this behavior, I'd love to fix it!

Cheers, Joel

etempm commented

Thank you. It is not always being. By the way, Dispose method also calls stop, son not important for me. I deleted stop method and no problem now.