From db4042c888b7c793167e3326f5e719ac53445b15 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 20 Sep 1996 06:11:20 +0000 Subject: (init_system_name): Retry gethostbyname only 5 times and don't sleep after the last time. --- src/sysdep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/sysdep.c') diff --git a/src/sysdep.c b/src/sysdep.c index a7026b8782..62a0194cdf 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2198,7 +2198,7 @@ init_system_name () { 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 @@ init_system_name () if (! (hp == 0 && h_errno == TRY_AGAIN)) #endif break; + if (count >= 5) + break; Fsleep_for (make_number (1), Qnil); } if (hp) -- cgit v1.2.3