diff options
Diffstat (limited to 'src/tcp_subr.c')
-rw-r--r-- | src/tcp_subr.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tcp_subr.c b/src/tcp_subr.c index c474a2d..8251c76 100644 --- a/src/tcp_subr.c +++ b/src/tcp_subr.c @@ -362,6 +362,16 @@ void tcp_sockclosed(struct tcpcb *tp) case TCPS_CLOSE_WAIT: tp->t_state = TCPS_LAST_ACK; break; + case TCPS_FIN_WAIT_2: + /* + * If we can't receive any more + * data, then closing user can proceed. + * Starting the timer is contrary to the + * specification, but if we don't get a FIN + * we'll hang forever. + */ + tp->t_timer[TCPT_2MSL] = TCP_LINGERTIME; + break; } tcp_output(tp); } |