From cf1ccba57f5e85ce6e4cd9743f722179f7dbec89 Mon Sep 17 00:00:00 2001 From: angt Date: Wed, 28 Oct 2015 08:17:49 +0100 Subject: [PATCH] Wait after a failed connect --- glorytun.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/glorytun.c b/glorytun.c index 67ffe7f..061786c 100644 --- a/glorytun.c +++ b/glorytun.c @@ -384,8 +384,10 @@ int main (int argc, char **argv) while (running) { sock.fd = listener?sk_accept(fd):sk_create(ai, sk_connect); - if (sock.fd==-1) + if (sock.fd==-1) { + usleep(100000); continue; + } fd_set_nonblock(sock.fd); sk_set_nodelay(sock.fd);