diff options
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index c0feeeef962a..e906014890b6 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -652,7 +652,8 @@ static void tcp_keepalive_timer (unsigned long data) | |||
652 | goto death; | 652 | goto death; |
653 | } | 653 | } |
654 | 654 | ||
655 | if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE) | 655 | if (!sock_flag(sk, SOCK_KEEPOPEN) || |
656 | ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_SYN_SENT))) | ||
656 | goto out; | 657 | goto out; |
657 | 658 | ||
658 | elapsed = keepalive_time_when(tp); | 659 | elapsed = keepalive_time_when(tp); |