From 88ee850e68838df34d0a57307299e07dac7d9771 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Tue, 27 Sep 2011 18:16:12 +0530 Subject: 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 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy --- rpc/rpc-lib/src/rpc-clnt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rpc') diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 6f1fbfc1591..43791dc57e1 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); -- cgit