Fix error handling for failing to fork after accepting a connection --

close fd, sleep, then try again.
This commit is contained in:
Martin Pool
2002-02-18 22:58:49 +00:00
parent 371d1c36b3
commit bd37c66630

View File

@@ -435,9 +435,9 @@ void start_accept_loop(int port, int (*fn)(int ))
* overloaded. Sleep briefly before trying to
* accept again. */
sleep(2);
} else {
close(fd);
}
close(fd);
}
}