summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client
diff options
context:
space:
mode:
authorKrishna Srinivas <krishna@zresearch.com>2009-03-10 00:00:58 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-03-10 15:38:20 +0530
commit3b45b4c922a5f5835afa4e9211d64da2c6868633 (patch)
treed44ed989feceed041f455fcc3689d2c2d98a85ab /xlators/protocol/client
parent6a70225b69e7c617cb0ff62124b2687a7027c64a (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>
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r--xlators/protocol/client/src/client-protocol.c8
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 95a5db89590..58eba01ed0b 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 (&current, 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;
}