Propagate cancel token to mixnet client

This commit is contained in:
Andrej Mihajlov
2025-10-13 12:25:54 +02:00
parent 5d45544c27
commit cfa7635ae1
2 changed files with 6 additions and 3 deletions
Generated
-1
View File
@@ -5746,7 +5746,6 @@ dependencies = [
"criterion",
"ff",
"group",
"lazy_static",
"nym-contracts-common",
"nym-pemstore",
"rand 0.8.5",
@@ -4,7 +4,8 @@
use nym_credential_storage::persistent_storage::PersistentStorage;
use nym_registration_common::NymNode;
use nym_sdk::{
DebugConfig, NymNetworkDetails, RememberMe, TopologyProvider, UserAgent,
DebugConfig, NymNetworkDetails, RememberMe, ShutdownToken, ShutdownTracker, TopologyProvider,
UserAgent,
mixnet::{
CredentialStorage, GatewaysDetailsStore, KeyStore, MixnetClient, MixnetClientBuilder,
MixnetClientStorage, OnDiskPersistent, ReplyStorageBackend, StoragePaths, x25519::KeyPair,
@@ -115,7 +116,10 @@ impl BuilderConfig {
.debug_config(debug_config)
.credentials_mode(true)
.with_remember_me(remember_me)
.custom_topology_provider(self.custom_topology_provider);
.custom_topology_provider(self.custom_topology_provider)
.custom_shutdown(ShutdownTracker::new_from_external_shutdown_token(
ShutdownToken::from(self.cancel_token),
));
#[cfg(unix)]
let builder = builder.with_connection_fd_callback(self.connection_fd_callback);