rpc-transport/socket: Donot fail reconnect if error is ENOENT

A AF_UNIX family socket should retry connect if error is ENOENT.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Change-Id: I23b1da12faadc8043d370862bfe29c0c5c223364
BUG: 767932
Reviewed-on: http://review.gluster.com/795
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
This commit is contained in:
shishir gowda 2011-12-15 15:13:14 +05:30 committed by Vijay Bellur
parent a6098362f9
commit 3853f4ccaf

View File

@ -2104,7 +2104,7 @@ socket_connect (rpc_transport_t *this, int port)
ret = connect (priv->sock, SA (&this->peerinfo.sockaddr),
this->peerinfo.sockaddr_len);
if (ret == -1 && errno != EINPROGRESS) {
if (ret == -1 && ((errno != EINPROGRESS) && (errno != ENOENT))) {
gf_log (this->name, GF_LOG_ERROR,
"connection attempt failed (%s)",
strerror (errno));