diff --git a/src/proxy/websocket/mod.rs b/src/proxy/websocket/mod.rs index 5f988795..6d2d2145 100644 --- a/src/proxy/websocket/mod.rs +++ b/src/proxy/websocket/mod.rs @@ -91,6 +91,10 @@ impl AsyncWrite for BinaryWsStream { Pin::new(&mut self.inner) .start_send(message) .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{:?}", e)))?; + + Pin::new(&mut self.inner) + .poll_flush(cx) + .map_err(|e| io::Error::new(io::ErrorKind::Other, format!("{:?}", e)))?; Poll::Ready(Ok(buf.len())) }