diff --git a/fanout.c b/fanout.c index cf60920c48154376d60871b825e0871c39cc1208..afeb367b5df0ae1260490d3b3ffc8f83f9803eed 100644 --- a/fanout.c +++ b/fanout.c @@ -567,6 +567,10 @@ resetting counter\n"); &optval, optlen)) == -1) fanout_error ("failed setting keepalive"); + if ((setsockopt (client_i->fd, SOL_SOCKET, SO_LINGER, + &so_linger, sizeof so_linger)) == -1) + fanout_error ("failed setting linger"); + //Shove current new connection in the front of the line client_i->next = client_head; if (client_head != NULL) {