diff options
Diffstat (limited to 'net/core/stream.c')
-rw-r--r-- | net/core/stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/stream.c b/net/core/stream.c index d1d7decf70b0..755bacbcb321 100644 --- a/net/core/stream.c +++ b/net/core/stream.c @@ -69,7 +69,7 @@ int sk_stream_wait_connect(struct sock *sk, long *timeo_p) sk->sk_write_pending++; done = sk_wait_event(sk, timeo_p, !sk->sk_err && - !((1 << sk->sk_state) & + !((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT))); finish_wait(sk->sk_sleep, &wait); sk->sk_write_pending--; @@ -139,7 +139,7 @@ int sk_stream_wait_memory(struct sock *sk, long *timeo_p) set_bit(SOCK_NOSPACE, &sk->sk_socket->flags); sk->sk_write_pending++; - sk_wait_event(sk, ¤t_timeo, !sk->sk_err && + sk_wait_event(sk, ¤t_timeo, !sk->sk_err && !(sk->sk_shutdown & SEND_SHUTDOWN) && sk_stream_memory_free(sk) && vm_wait); |