Wait after a failed connect
This commit is contained in:
@@ -384,8 +384,10 @@ int main (int argc, char **argv)
|
|||||||
while (running) {
|
while (running) {
|
||||||
sock.fd = listener?sk_accept(fd):sk_create(ai, sk_connect);
|
sock.fd = listener?sk_accept(fd):sk_create(ai, sk_connect);
|
||||||
|
|
||||||
if (sock.fd==-1)
|
if (sock.fd==-1) {
|
||||||
|
usleep(100000);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
fd_set_nonblock(sock.fd);
|
fd_set_nonblock(sock.fd);
|
||||||
sk_set_nodelay(sock.fd);
|
sk_set_nodelay(sock.fd);
|
||||||
|
|||||||
Reference in New Issue
Block a user