Do not flush on each poll_ready call

tungstenite-0.20
Alex Butler 2 years ago committed by Sebastian Dröge
parent bee1b5595a
commit 17866906ea
  1. 4
      src/lib.rs

@ -368,8 +368,8 @@ where
{ {
type Error = WsError; type Error = WsError;
fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { fn poll_ready(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
(*self).with_context(Some((ContextWaker::Write, cx)), |s| cvt(s.write_pending())) Poll::Ready(Ok(()))
} }
fn start_send(mut self: Pin<&mut Self>, item: Message) -> Result<(), Self::Error> { fn start_send(mut self: Pin<&mut Self>, item: Message) -> Result<(), Self::Error> {

Loading…
Cancel
Save