mirror of
https://gitee.com/RRQM_Home/TouchSocket.git
synced 2025-12-06 08:28:52 +08:00
fix: 重连动作取消令箭未生效 (#97)
This commit is contained in:
@@ -117,6 +117,9 @@ public class ReconnectionOption<TClient>
|
||||
|
||||
while (this.MaxRetryCount < 0 || attempts < this.MaxRetryCount)
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
if (client.PauseReconnection)
|
||||
{
|
||||
if (this.LogReconnection)
|
||||
@@ -147,6 +150,9 @@ public class ReconnectionOption<TClient>
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
this.OnFailed?.Invoke(client, attempts, ex);
|
||||
|
||||
if (this.LogReconnection)
|
||||
|
||||
Reference in New Issue
Block a user