summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.c')
-rw-r--r--rpc/rpc-transport/socket/src/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 5b7d57b3d4d..47cdc1b9de9 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1971,7 +1971,8 @@ socket_connect (rpc_transport_t *this, int port)
if (sock != -1) {
gf_log_callingfn (this->name, GF_LOG_TRACE,
"connect () called on transport already connected");
- ret = 0;
+ errno = EINPROGRESS;
+ ret = -1;
goto err;
}