From b66417082cc4119e36332784227042b421de8b3a Mon Sep 17 00:00:00 2001 From: SajjadPourali Date: Mon, 2 Nov 2026 19:46:56 -0700 Subject: [PATCH] Fix SYN-ACK wakeup after AtomicWaker migration --- src/stream/tcp.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/stream/tcp.rs b/src/stream/tcp.rs index 1341693..5867aa9 100644 --- a/src/stream/tcp.rs +++ b/src/stream/tcp.rs @@ -387,7 +387,6 @@ impl AsyncWrite for IpStackTcpStream { // The task that answers the SYN may not have run yet. Data written now would leave ahead of // the SYN-ACK, under the initial sequence number. if state == TcpState::Listen { - self.write_notify.lock().unwrap().replace(cx.waker().clone()); return Poll::Pending; } @@ -588,7 +587,7 @@ async fn tcp_main_logic_loop( let state = tcb.get_state(); log::trace!("{network_tuple} {state:?}: session now in {state:?} state"); } - write_notify.lock().unwrap().take().map(|w| w.wake_by_ref()).unwrap_or(()); + write_notify.wake(); let tcb_clone = tcb.clone();