private void ThrowIfAborted(bool aborted, Exception innerException)
{
if (aborted)
{
throw new WebSocketException(WebSocketError.InvalidState,
SR.Format(SR.net_WebSockets_InvalidState_ClosedOrAborted, GetType().FullName, WebSocketState.Aborted),
innerException);
}
}