diff --git a/net/tipc/socket.c b/net/tipc/socket.c index f9b4fb92c0b1c98f373bc2346e5d5e77c86d48f8..693e8902161efaa35f918dae4731a5c3a081c5fd 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -2441,6 +2441,8 @@ static int tipc_wait_for_connect(struct socket *sock, long *timeo_p) return -ETIMEDOUT; if (signal_pending(current)) return sock_intr_errno(*timeo_p); + if (sk->sk_state == TIPC_DISCONNECTING) + break; add_wait_queue(sk_sleep(sk), &wait); done = sk_wait_event(sk, timeo_p, tipc_sk_connected(sk),