Commit Graph
12 Commits
Author SHA1 Message Date
Guogang Li c6566b00c7 internal update
PiperOrigin-RevId: 549351164
2023-07-19 10:15:19 -07:00
Guogang Li a72be2bc8c internal update
PiperOrigin-RevId: 547982511
2023-07-13 18:21:18 -07:00
Guogang Li 85a01e9636 internal refactor
PiperOrigin-RevId: 547586065
2023-07-12 13:31:57 -07:00
Qin Wang a8b6fdee59 Implement fake GetResponse and migrate fake_http_client to third_party/nearby/internal/test
PiperOrigin-RevId: 544518775
2023-06-29 18:39:50 -07:00
Qin Wang 22c3a07677 Migrate DataManager to third_party/nearby/internal
PiperOrigin-RevId: 544395891
2023-06-29 10:31:07 -07:00
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
Juliet Levesque 8a78212bb8 [Nearby Connections] Check for shutdown before accessing ClientProxy.
During the destruction of NearbyConnections, Core (which owns ClientProxy) is destructed before ServiceController (which owns EndpointManager), which means any pending tasks on the EndpointManager executor that use ClientProxy will be using
garbage memory. To fix this issue, EndpointManager::DiscardEndpoint will check
for an `is_shutdown` boolean set during ~EndpointManager before accessing
ClientProxy. The assumption is that any accessing of ClientProxy after the
destruction will be invalid.

PiperOrigin-RevId: 532581122
2023-05-16 14:54:20 -07:00
Nick Bourdakos ebab912fb6 Fix heap-use-after-free issue in fake timer
PiperOrigin-RevId: 530644090
2023-05-09 10:15:09 -07:00
Guogang Li 15d81201f8 Fixed data race in FakeTaskRunner
PiperOrigin-RevId: 528627577
2023-05-01 18:06:35 -07:00
Guogang Li 46e4b3eca7 Fixed a data race bug in test codes
PiperOrigin-RevId: 528074883
2023-04-28 22:25:09 -07:00
Qin Wang 698ca77f2a Mutex guard FakeClock
PiperOrigin-RevId: 527382176
2023-04-26 14:52:46 -07:00
Qin Wang 86ca85b85a Migrate fake functions to third_party/nearby to help unit test
PiperOrigin-RevId: 517433481
2023-03-17 09:34:58 -07:00