Don't send pure window updates when the peer has closed the connection

and won't ever send more data.
This commit is contained in:
andre 2007-06-09 19:39:14 +00:00
parent c105658c88
commit e8333a59d1

View File

@ -528,8 +528,11 @@ tcp_output(struct tcpcb *tp)
* max size segments, or at least 50% of the maximum possible
* window, then want to send a window update to peer.
* Skip this if the connection is in T/TCP half-open state.
* Don't send pure window updates when the peer has closed
* the connection and won't ever send more data.
*/
if (recwin > 0 && !(tp->t_flags & TF_NEEDSYN)) {
if (recwin > 0 && !(tp->t_flags & TF_NEEDSYN) &&
!TCPS_HAVERCVDFIN(tp->t_state)) {
/*
* "adv" is the amount we can increase the window,
* taking into account that we are limited by