aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-09-20 06:11:20 +0000
committerRichard M. Stallman1996-09-20 06:11:20 +0000
commitdb4042c888b7c793167e3326f5e719ac53445b15 (patch)
tree7f830bec7bba2e276f66a8d2db64a829f7644327 /src
parent92c51e075e8bc9c2ace8487bfc42f23389d09b73 (diff)
downloademacs-db4042c888b7c793167e3326f5e719ac53445b15.tar.gz
emacs-db4042c888b7c793167e3326f5e719ac53445b15.zip
(init_system_name): Retry gethostbyname only 5 times
and don't sleep after the last time.
Diffstat (limited to 'src')
-rw-r--r--src/sysdep.c4
1 files changed, 3 insertions, 1 deletions
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 ()
2198 { 2198 {
2199 struct hostent *hp; 2199 struct hostent *hp;
2200 int count; 2200 int count;
2201 for (count = 0; count < 10; count++) 2201 for (count = 0;; count++)
2202 { 2202 {
2203#ifdef TRY_AGAIN 2203#ifdef TRY_AGAIN
2204 h_errno = 0; 2204 h_errno = 0;
@@ -2208,6 +2208,8 @@ init_system_name ()
2208 if (! (hp == 0 && h_errno == TRY_AGAIN)) 2208 if (! (hp == 0 && h_errno == TRY_AGAIN))
2209#endif 2209#endif
2210 break; 2210 break;
2211 if (count >= 5)
2212 break;
2211 Fsleep_for (make_number (1), Qnil); 2213 Fsleep_for (make_number (1), Qnil);
2212 } 2214 }
2213 if (hp) 2215 if (hp)