[Fix] Use try-finally

This commit is contained in:
sta 2017-02-03 15:51:35 +09:00
parent 262922f049
commit a376f305c2

View File

@ -652,12 +652,16 @@ namespace WebSocketSharp.Server
} }
try { try {
_listener.Stop (); try {
_listener.Stop ();
}
finally {
_services.Stop (1006, String.Empty);
}
} }
catch { catch {
} }
_services.Stop (1006, String.Empty);
_state = ServerState.Stop; _state = ServerState.Stop;
} }