3604df
From 62b06c684239586e020b619f91e1867a60a1ea6e Mon Sep 17 00:00:00 2001
3604df
From: Pranith Kumar K <pkarampu@redhat.com>
3604df
Date: Fri, 11 Nov 2016 15:32:34 +0530
3604df
Subject: [PATCH 158/162] Revert "rpc: Fix the race between notification and reconnection"
3604df
3604df
This reverts commit 6d6ec6231b2064653725516ee3afa12a0a28f035.
3604df
3604df
BUG: 1385605
3604df
Change-Id: I7d1b9ba261cdcf72072d256ec2d5cb7216104d25
3604df
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
3604df
Reviewed-on: https://code.engineering.redhat.com/gerrit/89793
3604df
---
3604df
 rpc/rpc-lib/src/rpc-clnt.c |    7 +++----
3604df
 1 files changed, 3 insertions(+), 4 deletions(-)
3604df
3604df
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
3604df
index d946cfc..a9e43eb 100644
3604df
--- a/rpc/rpc-lib/src/rpc-clnt.c
3604df
+++ b/rpc/rpc-lib/src/rpc-clnt.c
3604df
@@ -899,10 +899,6 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata,
3604df
         switch (event) {
3604df
         case RPC_TRANSPORT_DISCONNECT:
3604df
         {
3604df
-                if (clnt->notifyfn)
3604df
-                        ret = clnt->notifyfn (clnt, clnt->mydata,
3604df
-                                              RPC_CLNT_DISCONNECT, NULL);
3604df
-
3604df
                 rpc_clnt_connection_cleanup (conn);
3604df
 
3604df
                 pthread_mutex_lock (&conn->lock);
3604df
@@ -926,6 +922,9 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata,
3604df
                 }
3604df
                 pthread_mutex_unlock (&conn->lock);
3604df
 
3604df
+                if (clnt->notifyfn)
3604df
+                        ret = clnt->notifyfn (clnt, clnt->mydata,
3604df
+                                              RPC_CLNT_DISCONNECT, NULL);
3604df
                 if (unref_clnt)
3604df
                         rpc_clnt_ref (clnt);
3604df
 
3604df
-- 
3604df
1.7.1
3604df