diff --git a/quinn/src/connection.rs b/quinn/src/connection.rs index 828c34dad..53c864d6b 100644 --- a/quinn/src/connection.rs +++ b/quinn/src/connection.rs @@ -1057,7 +1057,7 @@ impl State { } }; - if self.io_poller.as_mut().poll_writable(cx)?.is_pending() { + if self.io_poller.as_mut().poll_writable(cx, &t)?.is_pending() { // Retry after a future wakeup self.buffered_transmit = Some(t); return Ok(false); diff --git a/quinn/src/runtime.rs b/quinn/src/runtime.rs index 9471c1834..cc31a57ab 100644 --- a/quinn/src/runtime.rs +++ b/quinn/src/runtime.rs @@ -98,7 +98,11 @@ pub trait UdpPoller: Send + Sync + Debug + 'static { /// register the task associated with `cx` to be woken when a send should be attempted /// again. Unlike in [`Future::poll`], a [`UdpPoller`] may be reused indefinitely no matter how /// many times `poll_writable` returns [`Poll::Ready`]. - fn poll_writable(self: Pin<&mut Self>, cx: &mut Context) -> Poll>; + fn poll_writable( + self: Pin<&mut Self>, + cx: &mut Context, + t: &proto::Transmit, + ) -> Poll>; } pin_project_lite::pin_project! { @@ -133,7 +137,11 @@ where MakeFut: Fn() -> Fut + Send + Sync + 'static, Fut: Future> + Send + Sync + 'static, { - fn poll_writable(self: Pin<&mut Self>, cx: &mut Context) -> Poll> { + fn poll_writable( + self: Pin<&mut Self>, + cx: &mut Context, + _t: &proto::Transmit, + ) -> Poll> { let mut this = self.project(); if this.fut.is_none() { this.fut.set(Some((this.make_fut)()));