From 3baa99ebef316c6a9947c17c6d0c4bca863a8c82 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Fri, 27 Mar 2009 22:11:31 +0530 Subject: ping-pong timer: - share last_sent and last_received between channels so that any activity ensures the remote host being alive (useful under heavy loads) - timer expiry disconnects both transports Signed-off-by: Anand V. Avati --- xlators/protocol/client/src/client-protocol.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/protocol/client/src/client-protocol.h') diff --git a/xlators/protocol/client/src/client-protocol.h b/xlators/protocol/client/src/client-protocol.h index ce8cd516953..4ae077e7a80 100644 --- a/xlators/protocol/client/src/client-protocol.h +++ b/xlators/protocol/client/src/client-protocol.h @@ -78,6 +78,8 @@ struct _client_conf { gf_lock_t lock; } forget; dict_t *saved_fds; + struct timeval last_sent; + struct timeval last_received; pthread_mutex_t mutex; }; typedef struct _client_conf client_conf_t; @@ -94,8 +96,6 @@ struct client_connection { gf_timer_t *reconnect; char connected; uint64_t max_block_size; - struct timeval last_sent; - struct timeval last_received; gf_timer_t *timer; gf_timer_t *ping_timer; }; -- cgit