mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Enhance on Bluetooth discovery check
PiperOrigin-RevId: 691947459
This commit is contained in:
committed by
Copybara-Service
parent
7f7dee54c0
commit
f391af8e47
@@ -31,6 +31,7 @@
|
||||
#include "internal/platform/cancelable_alarm.h"
|
||||
#include "internal/platform/exception.h"
|
||||
#include "internal/platform/logging.h"
|
||||
#include "internal/platform/scheduled_executor.h"
|
||||
|
||||
namespace nearby {
|
||||
namespace connections {
|
||||
@@ -356,12 +357,7 @@ class ClientRunnable final {
|
||||
|
||||
} // namespace
|
||||
|
||||
EncryptionRunner::~EncryptionRunner() {
|
||||
// Stop all the ongoing Runnables (as gracefully as possible).
|
||||
client_executor_.Shutdown();
|
||||
server_executor_.Shutdown();
|
||||
alarm_executor_.Shutdown();
|
||||
}
|
||||
EncryptionRunner::~EncryptionRunner() { Shutdown(); }
|
||||
|
||||
void EncryptionRunner::StartServer(ClientProxy* client,
|
||||
const std::string& endpoint_id,
|
||||
@@ -381,6 +377,17 @@ void EncryptionRunner::StartClient(ClientProxy* client,
|
||||
client_executor_.Execute("encryption-client", std::move(runnable));
|
||||
}
|
||||
|
||||
void EncryptionRunner::Shutdown() {
|
||||
if (is_stopped_.Set(true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Stop all the ongoing Runnables (as gracefully as possible).
|
||||
client_executor_.Shutdown();
|
||||
server_executor_.Shutdown();
|
||||
alarm_executor_.Shutdown();
|
||||
}
|
||||
|
||||
void EncryptionRunner::ResultListener::CallSuccessCallback(
|
||||
const std::string& endpoint_id,
|
||||
std::unique_ptr<securegcm::UKey2Handshake> ukey2,
|
||||
|
||||
Reference in New Issue
Block a user