tcp: allow sending ACKs in FinWait2 state.
This commit is contained in:
parent
de5f91a28b
commit
42dc04852b
|
@ -1574,8 +1574,9 @@ impl<'a> TcpSocket<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We do not transmit anything in the FIN-WAIT-2 state.
|
// We do not transmit data in the FIN-WAIT-2 state, but we may transmit
|
||||||
State::FinWait2 => return Err(Error::Exhausted),
|
// ACKs for incoming data.
|
||||||
|
State::FinWait2 => {}
|
||||||
|
|
||||||
// We do not transmit data or control flags in the CLOSING or TIME-WAIT states,
|
// We do not transmit data or control flags in the CLOSING or TIME-WAIT states,
|
||||||
// but we may retransmit an ACK.
|
// but we may retransmit an ACK.
|
||||||
|
@ -3093,6 +3094,11 @@ mod test {
|
||||||
assert_eq!(data, b"abc");
|
assert_eq!(data, b"abc");
|
||||||
(3, ())
|
(3, ())
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
|
recv!(s, [TcpRepr {
|
||||||
|
seq_number: LOCAL_SEQ + 1 + 1,
|
||||||
|
ack_number: Some(REMOTE_SEQ + 1 + 3),
|
||||||
|
..RECV_TEMPL
|
||||||
|
}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in New Issue