diff --git a/nym-client/src/client/cover_traffic_stream.rs b/nym-client/src/client/cover_traffic_stream.rs index c0e4e8dc57..4c076cbb30 100644 --- a/nym-client/src/client/cover_traffic_stream.rs +++ b/nym-client/src/client/cover_traffic_stream.rs @@ -99,6 +99,9 @@ impl LoopCoverTrafficStream { self.mix_tx .unbounded_send(MixMessage::new(cover_message.0, cover_message.1)) .unwrap(); + // JS: due to identical logical structure to OutQueueControl::on_message(), this is also + // presumably required to prevent bugs in the future. Exact reason is still unknown to me. + tokio::task::yield_now().await; } async fn run(&mut self) { diff --git a/nym-client/src/client/mod.rs b/nym-client/src/client/mod.rs index f6596751ac..b009b7c7b8 100644 --- a/nym-client/src/client/mod.rs +++ b/nym-client/src/client/mod.rs @@ -345,6 +345,8 @@ impl NymClient { input_tx.clone(), ); self.input_tx = Some(input_tx); - self.receive_tx = Some(received_messages_buffer_output_tx) + self.receive_tx = Some(received_messages_buffer_output_tx); + + info!("Client startup finished!"); } } diff --git a/nym-client/src/client/real_traffic_stream.rs b/nym-client/src/client/real_traffic_stream.rs index 2e83196610..997f709438 100644 --- a/nym-client/src/client/real_traffic_stream.rs +++ b/nym-client/src/client/real_traffic_stream.rs @@ -127,6 +127,9 @@ impl OutQueueControl { self.mix_tx .unbounded_send(MixMessage::new(next_packet.0, next_packet.1)) .unwrap(); + // JS: Not entirely sure why or how it fixes stuff, but without the yield call, + // the UnboundedReceiver [of mix_rx] will not get a chance to read anything + tokio::task::yield_now().await; } pub(crate) async fn run_out_queue_control(mut self) {