summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 5aae09e6156..94d878a47fd 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -2281,6 +2281,12 @@ client_mark_fd_bad(xlator_t *this)
return 0;
}
+static int
+is_connection_to_brick(struct rpc_clnt *rpc)
+{
+ return (rpc->conn.config.remote_port != 0);
+}
+
int
client_rpc_notify(struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
void *data)
@@ -2302,10 +2308,12 @@ client_rpc_notify(struct rpc_clnt *rpc, void *mydata, rpc_clnt_event_t event,
switch (event) {
case RPC_CLNT_PING: {
- ret = default_notify(this, GF_EVENT_CHILD_PING, data);
- if (ret)
- gf_log(this->name, GF_LOG_INFO, "CHILD_PING notify failed");
- conf->last_sent_event = GF_EVENT_CHILD_PING;
+ if (is_connection_to_brick(rpc)) {
+ ret = default_notify(this, GF_EVENT_CHILD_PING, data);
+ if (ret)
+ gf_log(this->name, GF_LOG_INFO, "CHILD_PING notify failed");
+ conf->last_sent_event = GF_EVENT_CHILD_PING;
+ }
break;
}
case RPC_CLNT_CONNECT: {