[Modify] Throw exception
This commit is contained in:
parent
918d8c4795
commit
a3802ec729
@ -1245,10 +1245,11 @@ namespace WebSocketSharp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_retryCountForConnect > _maxRetryCountForConnect) {
|
if (_retryCountForConnect > _maxRetryCountForConnect) {
|
||||||
_retryCountForConnect = 0;
|
var msg = "An opportunity for reconnecting has been lost.";
|
||||||
|
_logger.Error (msg);
|
||||||
|
|
||||||
var msg = "A series of reconnecting has failed.";
|
msg = "An interruption has occurred while attempting to connect.";
|
||||||
_logger.Fatal (msg);
|
error (msg, null);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -3149,6 +3150,11 @@ namespace WebSocketSharp
|
|||||||
throw new InvalidOperationException (msg);
|
throw new InvalidOperationException (msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_retryCountForConnect > _maxRetryCountForConnect) {
|
||||||
|
var msg = "A series of reconnecting has failed.";
|
||||||
|
throw new InvalidOperationException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
if (connect ())
|
if (connect ())
|
||||||
open ();
|
open ();
|
||||||
}
|
}
|
||||||
@ -3188,6 +3194,11 @@ namespace WebSocketSharp
|
|||||||
throw new InvalidOperationException (msg);
|
throw new InvalidOperationException (msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_retryCountForConnect > _maxRetryCountForConnect) {
|
||||||
|
var msg = "A series of reconnecting has failed.";
|
||||||
|
throw new InvalidOperationException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
Func<bool> connector = connect;
|
Func<bool> connector = connect;
|
||||||
connector.BeginInvoke (
|
connector.BeginInvoke (
|
||||||
ar => {
|
ar => {
|
||||||
|
Loading…
Reference in New Issue
Block a user