[Nearby Connections] Add methods to shutdown executors in bwu_manager

Adding methods that allow us to shutdown executors in bwu_manager
during Nearby Connections shutdown process to prevent potential crashes.

PiperOrigin-RevId: 466425604
This commit is contained in:
Pu Shi
2022-08-09 11:57:38 -07:00
committed by Copybara-Service
parent 2d979fd86c
commit 643c0efdde
7 changed files with 24 additions and 2 deletions
@@ -368,6 +368,7 @@ void ServiceControllerRouter::FinishClientSession(ClientProxy* client) {
// Stop any advertising and discovery that may be underway due to this client.
GetServiceController()->StopAdvertising(client);
GetServiceController()->StopDiscovery(client);
GetServiceController()->ShutdownBwuManagerExecutors();
// Finally, clear all state maintained by this client.
client->Reset();