Skip to content

Commit 4c40fd1

Browse files
committed
[ECO-5646] Updated disconnect flags to respect internet connection
1 parent 89ab4cd commit 4c40fd1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/IO.Ably.Shared/Realtime/Workflows/RealtimeWorkflow.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -825,14 +825,9 @@ ErrorInfo TransformIfTokenErrorAndNotRetryable()
825825

826826
async Task<(bool retry, bool clearKey)> GetDisconnectFlags()
827827
{
828-
if (cmd.RetryInstantly)
829-
{
830-
return (true, cmd.ClearConnectionKey);
831-
}
832-
833828
if ((cmd.Error != null && cmd.Error.IsRetryableStatusCode()) || cmd.Exception != null)
834829
{
835-
return (await Client.RestClient.CanConnectToAbly(), true);
830+
return (await Client.RestClient.CanConnectToAbly(), cmd.ClearConnectionKey);
836831
}
837832

838833
return (false, cmd.ClearConnectionKey);

0 commit comments

Comments
 (0)