diff options
| author | Krishna Srinivas <krishna@zresearch.com> | 2009-03-10 00:00:58 -0700 | 
|---|---|---|
| committer | Anand V. Avati <avati@amp.gluster.com> | 2009-03-10 15:38:20 +0530 | 
| commit | 3b45b4c922a5f5835afa4e9211d64da2c6868633 (patch) | |
| tree | d44ed989feceed041f455fcc3689d2c2d98a85ab | |
| parent | 6a70225b69e7c617cb0ff62124b2687a7027c64a (diff) | |
ping timer will not timeout if we recently got POLLOUT on the socket i.e if ((cur - (sent|received)) < timeout)
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
| -rw-r--r-- | xlators/protocol/client/src/client-protocol.c | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c index 95a5db895..58eba01ed 100644 --- a/xlators/protocol/client/src/client-protocol.c +++ b/xlators/protocol/client/src/client-protocol.c @@ -326,8 +326,6 @@ call_bail (void *data)  			}  		} -		/* TODO while(1) is not nice - use splice */ -  		do {  			saved_frame =   			saved_frames_get_timedout (conn->saved_frames, @@ -500,8 +498,10 @@ client_ping_timer_expired (void *data)  					      conn->ping_timer);  		gettimeofday (¤t, NULL); -		if ((current.tv_sec - conn->last_received.tv_sec) <  -		    conn->ping_timeout) { +		if (((current.tv_sec - conn->last_received.tv_sec) < +                     conn->ping_timeout) +                    || ((current.tv_sec - conn->last_sent.tv_sec) < +                        conn->ping_timeout)) {  			transport_activity = 1;  		}  | 
