summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorMohan Srinivasan <mohans@FreeBSD.org>2007-02-26 22:25:21 +0000
committerMohan Srinivasan <mohans@FreeBSD.org>2007-02-26 22:25:21 +0000
commit7c72af877023dbbd7aa8d4ed38d52386d6711680 (patch)
tree21cfa3a2368a7f712458dfdd8d3485b03c0c6fa7 /sys/netinet/tcp_usrreq.c
parent560a54e10cbf5d595fe5fcc5b79efee7ffee6ba9 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index c4362cfb0214..57195a436184 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1581,9 +1581,14 @@ tcp_usrclosed(tp)
if (tp && tp->t_state >= TCPS_FIN_WAIT_2) {
soisdisconnected(tp->t_inpcb->inp_socket);
/* To prevent the connection hanging in FIN_WAIT_2 forever. */
- if (tp->t_state == TCPS_FIN_WAIT_2)
- callout_reset(tp->tt_2msl, tcp_maxidle,
+ if (tp->t_state == TCPS_FIN_WAIT_2) {
+ int timeout;
+
+ timeout = (tcp_fast_finwait2_recycle) ?
+ tcp_finwait2_timeout : tcp_maxidle;
+ callout_reset(tp->tt_2msl, timeout,
tcp_timer_2msl, tp);
+ }
}
}