Connection sometimes performs extra retry when it should transition to SUSPENDED
state
#1782
Labels
bug
Something isn't working. It's clear that this does need to be fixed.
Issue description
ARTRealtime
will sometimes perform one more connection retry than it should — that is, it will perform a connection retry afterconnectionStateTtl
has been exceeded, violating RTN14e.Steps to reproduce
The steps vary depending on whether you're viewing the code before or after PR #1613, which made some test changes.
expectedTime
in testtest__059__Connection__connection_request_fails__connection_attempt_fails_for_any_recoverable_reason
from 3.0 to 4.9, and run the test a few times.XCTAssertGreaterThanOrEqual
relating to the number of observed retries to anXCAssertEqual
.Observed behaviour
The test fails because one more retry than expected was made.
Underlying issue
By adding logging to
ARTRealtime
(see 6f738c5), we see the following messages:Notice that the final "Scheduling timeout work" log message occurs after the date described by the "expected suspension at" log message. This suggests that the connection is only checking whether it should enter
SUSPENDED
in the moment that a timeout occurs, and not before scheduling work that might time out.┆Issue is synchronized with this Jira Bug by Unito
The text was updated successfully, but these errors were encountered: