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(