From 21f8cb89d6974d3264e988c2f85f441aa87e4cc4 Mon Sep 17 00:00:00 2001 From: mfahampshire Date: Mon, 2 Feb 2026 20:42:42 +0000 Subject: [PATCH] Streamline shutdown flush --- sdk/rust/nym-sdk/src/mixnet/native_client.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sdk/rust/nym-sdk/src/mixnet/native_client.rs b/sdk/rust/nym-sdk/src/mixnet/native_client.rs index b16da25239..33684a9e01 100644 --- a/sdk/rust/nym-sdk/src/mixnet/native_client.rs +++ b/sdk/rust/nym-sdk/src/mixnet/native_client.rs @@ -459,13 +459,10 @@ impl AsyncWrite for MixnetClient { mut self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll> { - // Complete any pending write first if self._write.is_some() { ready!(self.as_mut().poll_write(cx, &[]))?; } - - // Flush the underlying sink - Sink::poll_flush(self, cx).map_err(|_| std::io::Error::other("failed to flush the sink")) + Poll::Ready(Ok(())) } fn poll_shutdown( @@ -567,13 +564,10 @@ impl AsyncWrite for MixnetClientSender { mut self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll> { - // Complete any pending write first if self._write.is_some() { ready!(self.as_mut().poll_write(cx, &[]))?; } - - // Flush the underlying sink - Sink::poll_flush(self, cx).map_err(|_| std::io::Error::other("failed to flush the sink")) + Poll::Ready(Ok(())) } fn poll_shutdown(