diff --git a/lib/ratp.c b/lib/ratp.c index 46a82c6..e7fbf64 100644 --- a/lib/ratp.c +++ b/lib/ratp.c @@ -1689,7 +1689,7 @@ if (!ri) return; - if (ri->state == RATP_STATE_ESTABLISHED) { + if (ri->state == RATP_STATE_ESTABLISHED || ri->state == RATP_STATE_SYN_RECEIVED) { uint64_t start; u8 control; diff --git a/scripts/remote/ratp.py b/scripts/remote/ratp.py index 7972d31..44f3e2f 100644 --- a/scripts/remote/ratp.py +++ b/scripts/remote/ratp.py @@ -721,7 +721,7 @@ def close(self, timeout=1.0): deadline = monotonic() + timeout logging.info("CLOSE") - if self._state == RatpState.established: + if self._state == RatpState.established or self._state == RatpState.syn_received: fin = RatpPacket(flags='FA') fin.c_sn = (self._s_sn + 1) % 2 fin.c_an = (self._r_sn + 1) % 2