summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2011-09-27 18:16:12 +0530
committerVijay Bellur <vijay@gluster.com>2011-11-18 04:26:01 -0800
commit88ee850e68838df34d0a57307299e07dac7d9771 (patch)
treeda4d763b14f1737e55e22bdb9414e7f5159ee38b /rpc
parent9b391694eb53b73a5284bd5294ee66a690e7398d (diff)
rpc: Need to update conn->last_recieved.
This is important for protocol/client's ping_timer to function correctly. Change-Id: I9f45d701126bb739535d9c5ec280833362bef9ed BUG: 3816 Reviewed-on: http://review.gluster.com/512 Reviewed-by: Amar Tumballi <amar@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 6f1fbfc15..43791dc57 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -897,6 +897,12 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata,
case RPC_TRANSPORT_MSG_RECEIVED:
{
+ pthread_mutex_lock (&conn->lock);
+ {
+ gettimeofday (&conn->last_received, NULL);
+ }
+ pthread_mutex_unlock (&conn->lock);
+
pollin = data;
if (pollin->is_reply)
ret = rpc_clnt_handle_reply (clnt, pollin);