From dd55755e0ccc94f721e8ada7e50c976c9cb68c4b Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 13 Apr 2011 00:27:02 +0000 Subject: rpc-clnt: consider the (re-)configured port for only one connect() call this way, if remote_port is set due to queryport, that can fall back to default port (or 'option remote-port' value) when it disconnects. Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 2709 (issues with port (re-)configuration in client protocol) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2709 --- rpc/rpc-transport/socket/src/socket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rpc/rpc-transport') diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index 5b7d57b3d..47cdc1b9d 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; } -- cgit