[Modify] Throw InvalidOperationException
This commit is contained in:
parent
d3886a256a
commit
8d372c0371
@ -895,12 +895,6 @@ namespace WebSocketSharp.Server
|
||||
/// -or-
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The session could not be found.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// -or-
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <paramref name="code"/> is 1010 (mandatory extension).
|
||||
/// </para>
|
||||
/// <para>
|
||||
@ -917,6 +911,9 @@ namespace WebSocketSharp.Server
|
||||
/// <paramref name="reason"/> could not be UTF-8-encoded.
|
||||
/// </para>
|
||||
/// </exception>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// The session could not be found.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentOutOfRangeException">
|
||||
/// <para>
|
||||
/// <paramref name="code"/> is less than 1000 or greater than 4999.
|
||||
@ -933,7 +930,7 @@ namespace WebSocketSharp.Server
|
||||
IWebSocketSession session;
|
||||
if (!TryGetSession (id, out session)) {
|
||||
var msg = "The session could not be found.";
|
||||
throw new ArgumentException (msg, "id");
|
||||
throw new InvalidOperationException (msg);
|
||||
}
|
||||
|
||||
session.Context.WebSocket.Close (code, reason);
|
||||
|
Loading…
Reference in New Issue
Block a user