Message ID | 511CAE34.3050800@redhat.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 54bb7bd..e5d1467 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -1184,11 +1184,11 @@ static int vsock_stream_connect(struct socket *sock, struct sockaddr *addr, if (err < 0) goto out; - /* Mark sock as connecting and set the error code to in + /* When still connecting set the error code to in * progress in case this is a non-blocking connect. */ - sock->state = SS_CONNECTING; - err = -EINPROGRESS; + if (sock->state == SS_CONNECTING) + err = -EINPROGRESS; } /* The receive path will handle all communication until we are able to