From 73438b672a8fd2da72f2282ddbdcc68fa91cb8e3 Mon Sep 17 00:00:00 2001 From: Jedrzej Stuczynski Date: Tue, 21 Jan 2020 17:09:12 +0000 Subject: [PATCH] Change in how OutQueueControl is spawned - not entirely sure at this point why its required --- nym-client/src/client/mod.rs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/nym-client/src/client/mod.rs b/nym-client/src/client/mod.rs index 3ee95debd7..786c36e7bc 100644 --- a/nym-client/src/client/mod.rs +++ b/nym-client/src/client/mod.rs @@ -171,13 +171,20 @@ impl NymClient { initial_topology.clone(), )); - let out_queue_control_future = rt.spawn(real_traffic_stream::control_out_queue( - mix_tx, - self.input_rx, - Destination::new(self.address, Default::default()), - initial_topology.clone(), - )); + let topology_clone = initial_topology.clone(); + let self_address = self.address; + let input_rx = self.input_rx; + let out_queue_control_future = rt.spawn(async move { + real_traffic_stream::OutQueueControl::new( + mix_tx, + input_rx, + Destination::new(self_address, Default::default()), + topology_clone, + ) + .run_out_queue_control() + .await + }); let provider_polling_future = rt.spawn(provider_poller.start_provider_polling()); match self.socket_type {