diff options
| author | Anand V. Avati <avati@amp.gluster.com> | 2009-03-27 22:11:31 +0530 | 
|---|---|---|
| committer | Anand V. Avati <avati@amp.gluster.com> | 2009-03-28 00:53:07 +0530 | 
| commit | 3baa99ebef316c6a9947c17c6d0c4bca863a8c82 (patch) | |
| tree | e2d151a81d9eb213fd468e76b9785cc6f7c40ee1 /xlators/protocol/client/src/client-protocol.h | |
| parent | 6c28cb81b2a326a416968932919ea9d19f3b56ab (diff) | |
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 <avati@amp.gluster.com>
Diffstat (limited to 'xlators/protocol/client/src/client-protocol.h')
| -rw-r--r-- | xlators/protocol/client/src/client-protocol.h | 4 | 
1 files changed, 2 insertions, 2 deletions
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;  };  | 
