changeset 16249:8b6e34dbb961

(init_system_name): Retry gethostbyname only 5 times and don't sleep after the last time.
author Richard M. Stallman <rms@gnu.org>
date Fri, 20 Sep 1996 06:11:20 +0000
parents b2fae8abc5b0
children aaa0ecdc4772
files src/sysdep.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/sysdep.c	Fri Sep 20 01:10:05 1996 +0000
+++ b/src/sysdep.c	Fri Sep 20 06:11:20 1996 +0000
@@ -2198,7 +2198,7 @@
     {
       struct hostent *hp;
       int count;
-      for (count = 0; count < 10; count++)
+      for (count = 0;; count++)
 	{
 #ifdef TRY_AGAIN
 	  h_errno = 0;
@@ -2208,6 +2208,8 @@
 	  if (! (hp == 0 && h_errno == TRY_AGAIN))
 #endif
 	    break;
+	  if (count >= 5)
+	    break;
 	  Fsleep_for (make_number (1), Qnil);
 	}
       if (hp)