Moved the Ext.CheckIfValidCloseParameters methods to the WebSocket class
This commit is contained in:
@@ -757,7 +757,9 @@ namespace WebSocketSharp.Server
|
||||
public void Stop (ushort code, string reason)
|
||||
{
|
||||
lock (_sync) {
|
||||
var msg = _state.CheckIfStart () ?? code.CheckIfValidCloseParameters (reason);
|
||||
var msg = _state.CheckIfStart () ??
|
||||
WebSocket.CheckIfValidCloseParameters (code, reason, false);
|
||||
|
||||
if (msg != null) {
|
||||
_logger.Error (msg);
|
||||
return;
|
||||
@@ -793,7 +795,9 @@ namespace WebSocketSharp.Server
|
||||
public void Stop (CloseStatusCode code, string reason)
|
||||
{
|
||||
lock (_sync) {
|
||||
var msg = _state.CheckIfStart () ?? code.CheckIfValidCloseParameters (reason);
|
||||
var msg = _state.CheckIfStart () ??
|
||||
WebSocket.CheckIfValidCloseParameters (code, reason, false);
|
||||
|
||||
if (msg != null) {
|
||||
_logger.Error (msg);
|
||||
return;
|
||||
|
@@ -842,7 +842,9 @@ namespace WebSocketSharp.Server
|
||||
public void Stop (ushort code, string reason)
|
||||
{
|
||||
lock (_sync) {
|
||||
var msg = _state.CheckIfStart () ?? code.CheckIfValidCloseParameters (reason);
|
||||
var msg = _state.CheckIfStart () ??
|
||||
WebSocket.CheckIfValidCloseParameters (code, reason, false);
|
||||
|
||||
if (msg != null) {
|
||||
_logger.Error (msg);
|
||||
return;
|
||||
@@ -877,7 +879,9 @@ namespace WebSocketSharp.Server
|
||||
public void Stop (CloseStatusCode code, string reason)
|
||||
{
|
||||
lock (_sync) {
|
||||
var msg = _state.CheckIfStart () ?? code.CheckIfValidCloseParameters (reason);
|
||||
var msg = _state.CheckIfStart () ??
|
||||
WebSocket.CheckIfValidCloseParameters (code, reason, false);
|
||||
|
||||
if (msg != null) {
|
||||
_logger.Error (msg);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user