diff options
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 3caab985cfe..e8a8ea2ecd9 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -898,10 +898,6 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata, switch (event) { case RPC_TRANSPORT_DISCONNECT: { - if (clnt->notifyfn) - ret = clnt->notifyfn (clnt, clnt->mydata, - RPC_CLNT_DISCONNECT, NULL); - rpc_clnt_connection_cleanup (conn); pthread_mutex_lock (&conn->lock); @@ -925,6 +921,9 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata, } pthread_mutex_unlock (&conn->lock); + if (clnt->notifyfn) + ret = clnt->notifyfn (clnt, clnt->mydata, + RPC_CLNT_DISCONNECT, NULL); if (unref_clnt) rpc_clnt_ref (clnt); |