From: Richard M. Stallman Date: Fri, 20 Sep 1996 06:11:20 +0000 (+0000) Subject: (init_system_name): Retry gethostbyname only 5 times X-Git-Tag: emacs-20.1~3695 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=db4042c888b7c793167e3326f5e719ac53445b15;p=emacs.git (init_system_name): Retry gethostbyname only 5 times and don't sleep after the last time. --- diff --git a/src/sysdep.c b/src/sysdep.c index a7026b87824..62a0194cdf1 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)