Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > 2bca560cd967a92702048a96717c5fe1 > files > 1

libbeagle-0.3.5.1-3mdv2009.0.src.rpm

--- trunk/libbeagle/beagle/beagle-request.c	2008/05/06 01:04:42	4746
+++ trunk/libbeagle/beagle/beagle-request.c	2008/05/06 13:09:51	4747
@@ -211,8 +211,10 @@
 	/* We retry on EGAIN or EINTR: since both of these mean the socket is active,
 	 * there is no harm in trying to retry a lot of times. A blocking socket would
 	 * have done the same.
+	 * Try maximum 10 times, more than a certain threshold means beagled is somehow
+	 * hanged and not reachable for all practical purposes.
 	 */
-#define MAX_RETRIES 500
+#define MAX_RETRIES 10 /* 10 * 200 msec ~> 2 sec */
 
 	for (retries = 0; retries < MAX_RETRIES; ++ retries) {
 		if (connect (sockfd, (struct sockaddr *) &sun, sizeof (sun)) >= 0)