diff options
author | Nate Straz <nstraz@redhat.com> | 2006-08-11 18:54:04 +0000 |
---|---|---|
committer | Nathan Straz <nstraz@redhat.com> | 2008-09-23 09:37:46 -0400 |
commit | 1b8dcdd76275c1a5071a844becc8c3d6e9daae16 (patch) | |
tree | 6aff5e722c6d230ebc7f23c1a76175f86a63ea7f /btime.c | |
parent | 4464bbb265280cd2bd015a662b76a316c228cc28 (diff) | |
download | qarsh-1b8dcdd76275c1a5071a844becc8c3d6e9daae16.tar.gz qarsh-1b8dcdd76275c1a5071a844becc8c3d6e9daae16.tar.xz qarsh-1b8dcdd76275c1a5071a844becc8c3d6e9daae16.zip |
After doing some debugging with the fleas, it turns out we're not
waiting around long enough for the heartbeat response to come back.
Since we only heartbeat when there isn't any output (in qarsh),
taking up to a second won't hurt. After doing some tests I'm changing
the recvfrom to recvfrom sleep to 1000 usec and retrying up to 40 times.
Diffstat (limited to 'btime.c')
-rw-r--r-- | btime.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -96,7 +96,7 @@ btime(const char *host) if ((nbytes = recvfrom(sd, &response, BTIME_MSGLEN, MSG_DONTWAIT, (struct sockaddr *)&resp_addr, &resp_addr_len)) < 0) { if (errno == EAGAIN) { - usleep(retry * 100); + usleep(RETRY_SLEEP); continue; } else { /* Non EAGAIN error... */ @@ -113,7 +113,7 @@ btime(const char *host) btime = strtoul(response+COOKIE_LEN, NULL, 10); break; } else { - fprintf(stderr, "Ignoring invalid cookie\n"); + /* ignore the invalid btime cookie */ continue; } } else if (!same_addr(&serv_addr, &resp_addr)) { |