Elevator icon indicating copy to clipboard operation
Elevator copied to clipboard

Pressing Escape to exit program causes a System.ObjectDisposedException

Open TychosNose opened this issue 9 years ago • 3 comments

Attempting to escape out of the program by pressing the ESC key results in the program throwing an unhandled ObjectDisposedException. The message description states "Safe handle has been closed". The line where the exception is thrown is in Program.cs line 79: "tokenSource.Cancel()".

TychosNose avatar Jul 18 '16 19:07 TychosNose

I suspect the issue is that the server object is already disposed because of line 78: server.Shutdown() which calls Dispose(). I'll do some more investigation.

TychosNose avatar Jul 18 '16 19:07 TychosNose

Just to double-check: which command line shell were you using? PowerShell? cmd.exe?

nolanlawson avatar Sep 15 '16 16:09 nolanlawson

cmd.exe

TychosNose avatar Sep 15 '16 18:09 TychosNose