[Modify] Do not throw
This commit is contained in:
parent
b5d62e06cd
commit
06edc3beae
@ -1012,31 +1012,24 @@ namespace WebSocketSharp.Server
|
|||||||
_state = ServerState.ShuttingDown;
|
_state = ServerState.ShuttingDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
var threw = false;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_services.Stop (code, reason);
|
_services.Stop (code, reason);
|
||||||
}
|
}
|
||||||
catch {
|
catch (Exception ex) {
|
||||||
threw = true;
|
_log.Fatal (ex.Message);
|
||||||
|
_log.Debug (ex.ToString ());
|
||||||
throw;
|
|
||||||
}
|
}
|
||||||
finally {
|
|
||||||
try {
|
try {
|
||||||
stopReceiving (5000);
|
stopReceiving (5000);
|
||||||
}
|
}
|
||||||
catch {
|
catch (Exception ex) {
|
||||||
if (!threw)
|
_log.Fatal (ex.Message);
|
||||||
throw;
|
_log.Debug (ex.ToString ());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
_state = ServerState.Stop;
|
_state = ServerState.Stop;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void stopReceiving (int millisecondsTimeout)
|
private void stopReceiving (int millisecondsTimeout)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user