summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/process.c b/src/process.c
index db6e85c0fb3..65dec1457b0 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2722,7 +2722,6 @@ usage: (make-network-process &rest ARGS) */)
int xerrno = 0;
int s = -1, outch, inch;
struct gcpro gcpro1;
- int retry = 0;
int count = SPECPDL_INDEX ();
int count1;
Lisp_Object QCaddress; /* one of QClocal or QCremote */
@@ -3023,6 +3022,8 @@ usage: (make-network-process &rest ARGS) */)
{
int optn, optbits;
+ retry_connect:
+
s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol);
if (s < 0)
{
@@ -3101,8 +3102,6 @@ usage: (make-network-process &rest ARGS) */)
break;
}
- retry_connect:
-
immediate_quit = 1;
QUIT;
@@ -3144,22 +3143,13 @@ usage: (make-network-process &rest ARGS) */)
immediate_quit = 0;
- if (xerrno == EINTR)
- goto retry_connect;
- if (xerrno == EADDRINUSE && retry < 20)
- {
- /* A delay here is needed on some FreeBSD systems,
- and it is harmless, since this retrying takes time anyway
- and should be infrequent. */
- Fsleep_for (make_number (1), Qnil);
- retry++;
- goto retry_connect;
- }
-
/* Discard the unwind protect closing S. */
specpdl_ptr = specpdl + count1;
emacs_close (s);
s = -1;
+
+ if (xerrno == EINTR)
+ goto retry_connect;
}
if (s >= 0)