Revert "Do not allow ObjectDisposed exceptions to trigger disconnectreason"
This reverts commit f6dacb7a84.
This commit is contained in:
@@ -146,7 +146,7 @@ namespace Discord
|
|||||||
if (_webSocket.State != WebSocketState.Open || cancelToken.IsCancellationRequested)
|
if (_webSocket.State != WebSocketState.Open || cancelToken.IsCancellationRequested)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = await _webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), cancelToken);
|
result = await _webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), cancelToken);
|
||||||
}
|
}
|
||||||
@@ -182,7 +182,6 @@ namespace Discord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException) { }
|
catch (OperationCanceledException) { }
|
||||||
catch (ObjectDisposedException) { }
|
|
||||||
catch (Exception ex) { DisconnectInternal(ex); }
|
catch (Exception ex) { DisconnectInternal(ex); }
|
||||||
}
|
}
|
||||||
private async Task SendAsync()
|
private async Task SendAsync()
|
||||||
@@ -211,7 +210,6 @@ namespace Discord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException) { }
|
catch (OperationCanceledException) { }
|
||||||
catch (ObjectDisposedException) { }
|
|
||||||
catch (Exception ex) { DisconnectInternal(ex); }
|
catch (Exception ex) { DisconnectInternal(ex); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user