Browse Source

[Modify] Do not throw

pull/425/merge
sta 4 years ago
parent
commit
ca78024530
  1. 33
      websocket-sharp/Server/WebSocketServer.cs

33
websocket-sharp/Server/WebSocketServer.cs

@ -922,29 +922,22 @@ namespace WebSocketSharp.Server
}
try {
var threw = false;
try {
stopReceiving (5000);
}
catch {
threw = true;
stopReceiving (5000);
}
catch (Exception ex) {
_log.Fatal (ex.Message);
_log.Debug (ex.ToString ());
}
throw;
}
finally {
try {
_services.Stop (code, reason);
}
catch {
if (!threw)
throw;
}
}
try {
_services.Stop (code, reason);
}
finally {
_state = ServerState.Stop;
catch (Exception ex) {
_log.Fatal (ex.Message);
_log.Debug (ex.ToString ());
}
_state = ServerState.Stop;
}
private void stopReceiving (int millisecondsTimeout)

Loading…
Cancel
Save