Commit 55bb7fff authored by Wayne Davison's avatar Wayne Davison

Don't loop forever when the receiver is waiting around to be killed

at EOF -- it should be a rapidly arriving event, so only hang around
for 10 seconds, max., and then go ahead and report the "unexpectedly
closed" error.
parent 662bdcd4
...@@ -376,9 +376,11 @@ void io_set_filesfrom_fds(int f_in, int f_out) ...@@ -376,9 +376,11 @@ void io_set_filesfrom_fds(int f_in, int f_out)
static void whine_about_eof(int fd) static void whine_about_eof(int fd)
{ {
if (kluge_around_eof && fd == sock_f_in) { if (kluge_around_eof && fd == sock_f_in) {
int i;
if (kluge_around_eof > 0) if (kluge_around_eof > 0)
exit_cleanup(0); exit_cleanup(0);
while (1) /* If we're still here after 10 seconds, exit with an error. */
for (i = 10*1000/20; i--; )
msleep(20); msleep(20);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment