diff --git a/src/proto/streams/stream.rs b/src/proto/streams/stream.rs index 36d515ba..040af91e 100644 --- a/src/proto/streams/stream.rs +++ b/src/proto/streams/stream.rs @@ -322,7 +322,9 @@ impl Stream { } pub fn wait_send(&mut self, cx: &Context) { - self.send_task = Some(cx.waker().clone()); + if let Some(task) = self.send_task.take() { + task.wake(); + } } pub fn notify_recv(&mut self) {