Wait after a failed connect

This commit is contained in:
angt
2015-10-28 08:17:49 +01:00
parent b480a6eac3
commit cf1ccba57f

View File

@@ -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);