[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nas] sleep(1)s in ConnSvr.c
- To: nas@xxxxxxxxxxx
- Subject: [nas] sleep(1)s in ConnSvr.c
- From: "Kris Marsh" <moogman@xxxxxxxxx>
- Date: Sun, 3 Aug 2008 01:46:19 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=ZL8RIlQMldVTZK8w3GvGYBGknI6v+wl4Gr+5Ry/PV6I=; b=AP/fWMktwVwtnrk8foAUzCi6KZK7kSevLW1EqtZbtEM23eAybc6hNKAe4m4vlYeznH XbWPw6kehLDmetieDtyCtFumgL/hOrFgGVKDuyH1cI6VhnCPTT4m/Tkp1SPoSD/U7ny1 73IIEg2akN7vINqwp7UlbdAHGVDHKmGWQgdZQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=a/L8+egI42bEzIsR2G2Wy8QthrhLe4Pd05W1IAKlpIobR59ZwU/kfd6rDtLg8qvvN2 EOzKQRtmQr/p2kbzdm6TciJqo0tjBygiU5VnPxQ5AEvO8IWTEJp5Fn9ivtyt5Nzo/PDy ONXIrcDUCWrZZ1bGs9RmgX+wXsy5E5LDXsLDc=
- Sender: owner-nas@xxxxxxxxxxx
Hi guys,
I'm just wondering about the rationale for the sleep(1) at
ConnSvr.c:895 ConnSvr.c:1060 and ConnSvr.c:1104.
It seems to me that they're all basically pausing after a failed
{UNIX,tcp} socket connection. What I'm wondering is why this is
happening, and also the reasoning behind the retries. Is it expected
that re-trying a failed connection after a second would ever succeed?
Ultimately, I would love to see these sleeps removed (attached patch),
and also the #define AU_CONNECTION_RETRIES 5 at ConnSvr.c:84 set to 0
- is there any likelihood of this happening? My application is pausing
for 5 secs before it can continue if a NAS server is unable to be
contacted.
Thanks!
Kris
--- ConnSvr.c.orig 2008-08-03 01:35:58.000000000 +0100
+++ ConnSvr.c 2008-08-03 01:37:05.000000000 +0100
@@ -892,7 +892,6 @@ static int MakeUNIXSocketConnection (
return -1;
}
- sleep (1);
} else {
break;
}
@@ -1057,7 +1056,6 @@ static int MakeTCPConnection (
errno = olderrno;
return -1;
}
- sleep (1);
} else {
break;
}
@@ -1101,7 +1099,6 @@ static int MakeTCPConnection (
errno = olderrno;
return -1;
}
- sleep (1);
} else {
break;
}