Browse Source

shutdown sockets immediatly if srv->exiting is true

personal/stbuehler/wip
Stefan Bühler 14 years ago
parent
commit
267b0bf6fc
  1. 5
      src/worker.c

5
src/worker.c

@ -29,6 +29,11 @@ void worker_add_closing_socket(worker *wrk, int fd) {
worker_closing_socket *scs = g_slice_new0(worker_closing_socket);
shutdown(fd, SHUT_WR);
if (g_atomic_int_get(&wrk->srv->exiting)) {
shutdown(fd, SHUT_RD);
close(fd);
return;
}
scs->wrk = wrk;
scs->fd = fd;

Loading…
Cancel
Save