[Modify] Replace it
This commit is contained in:
parent
c0c05efd5c
commit
d69f900c89
@ -655,24 +655,15 @@ namespace WebSocketSharp
|
|||||||
if (value <= TimeSpan.Zero)
|
if (value <= TimeSpan.Zero)
|
||||||
throw new ArgumentOutOfRangeException ("value", "Zero or less.");
|
throw new ArgumentOutOfRangeException ("value", "Zero or less.");
|
||||||
|
|
||||||
if (_readyState == WebSocketState.Open) {
|
string msg;
|
||||||
_logger.Warn ("The connection has already been established.");
|
if (!canSet (out msg)) {
|
||||||
return;
|
_logger.Warn (msg);
|
||||||
}
|
|
||||||
|
|
||||||
if (_readyState == WebSocketState.Closing) {
|
|
||||||
_logger.Warn ("The connection is closing.");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (_forState) {
|
lock (_forState) {
|
||||||
if (_readyState == WebSocketState.Open) {
|
if (!canSet (out msg)) {
|
||||||
_logger.Warn ("The connection has already been established.");
|
_logger.Warn (msg);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_readyState == WebSocketState.Closing) {
|
|
||||||
_logger.Warn ("The connection is closing.");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user