From: Dobrica Pavlinusic Date: Fri, 20 May 2011 12:00:03 +0000 (+0000) Subject: use SO_KEEPALIVE to detect hanging connections X-Git-Url: http://git.rot13.org/?p=virtual-ldap;a=commitdiff_plain;h=495fb580ea5f2cb6e48eb2f1b10392b3f00125e9 use SO_KEEPALIVE to detect hanging connections --- diff --git a/bin/ldap-koha.pl b/bin/ldap-koha.pl index e97e1ef..e9ed1f9 100755 --- a/bin/ldap-koha.pl +++ b/bin/ldap-koha.pl @@ -26,6 +26,7 @@ while (my @ready = $sel->can_read) { if ($fh == $sock) { # let's create a new socket my $psock = $sock->accept; + $psock->sockopt(SO_KEEPALIVE,1); $sel->add($psock); $Handlers{*$psock} = LDAP::Koha->new($psock); } else {