From ecfec8b787f0847f2c6a1bc0f18c297437dcae1b Mon Sep 17 00:00:00 2001 From: putyWang <13540025344@163.com> Date: Sun, 12 Nov 2023 17:08:58 +0800 Subject: [PATCH] fix clipping --- src/socket/tcp.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/socket/tcp.rs b/src/socket/tcp.rs index a02b6bea6..97335b77b 100644 --- a/src/socket/tcp.rs +++ b/src/socket/tcp.rs @@ -2326,11 +2326,8 @@ impl<'a> Socket<'a> { emit(cx, (ip_repr, repr))?; // while actually sending the syn packet, add or update the SynRetransmit timer - match (self.state, self.timer) { - (State::SynSent, Timer::SynRetransmit { .. } | Timer::Idle { .. }) => { + if let (State::SynSent, Timer::SynRetransmit { .. } | Timer::Idle { .. }) = (self.state, self.timer) { self.timer.set_for_syn_retransmit(cx.now()); - } - _ => (), } // We've sent something, whether useful data or a keep-alive packet, so rewind // the keep-alive timer.