diff options
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt-ping.c')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt-ping.c | 10 |
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 17f8874a6a4..77f3e32001c 100644 --- a/rpc/rpc-lib/src/rpc-clnt-ping.c +++ b/rpc/rpc-lib/src/rpc-clnt-ping.c @@ -89,9 +89,13 @@ __rpc_clnt_remove_ping_timer (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; } |