Commit Graph
1 Commits
Author SHA1 Message Date
Juliet Levesque 240159e872 [Nearby Connections] Stop 3 AttemptsToConnect over WebRTC for CancellationFlag
CancellationFlags will be used to prevent crashes during the shutdown of Nearby Connections from pending tasks taking too long during the shutdown period. WebRTC using 3 x 10s retries to connect, which means we are potentially waiting for 30 seconds of retries to execute during shutdown (which is longer than the 10s duration alloted for Core shutdown).

By using CancellationFlags, we can prevent the retries occuring during the Shutdown by short-circuiting an in flight AttemptToConnect, and checking for Cancellation before retries.

PiperOrigin-RevId: 539690403
2023-06-12 10:16:36 -07:00