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.