summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt-ping.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt-ping.c b/rpc/rpc-lib/src/rpc-clnt-ping.c
index 64d319d0057..a7ff866ac99 100644
--- a/rpc/rpc-lib/src/rpc-clnt-ping.c
+++ b/rpc/rpc-lib/src/rpc-clnt-ping.c
@@ -84,9 +84,13 @@ rpc_clnt_remove_ping_timer_locked (struct rpc_clnt *rpc)
return 1;
}
- gf_log_callingfn ("", GF_LOG_DEBUG, "%s: ping timer event "
- "already removed",
- conn->trans->peerinfo.identifier);
+
+ /* This is to account for rpc_clnt_disable that might have set
+ * conn->trans to NULL. */
+ if (conn->trans)
+ gf_log_callingfn ("", GF_LOG_DEBUG, "%s: ping timer event "
+ "already removed",
+ conn->trans->peerinfo.identifier);
return 0;
}