From a2211757c2124929e68fc97bf79e5962670f1727 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 22 Feb 2013 17:39:04 +0000 Subject: [PATCH] keepalive added git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2785 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/et_client.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/et_client.pl b/contrib/et_client.pl index 5467a55c8..bd3a2924e 100644 --- a/contrib/et_client.pl +++ b/contrib/et_client.pl @@ -42,11 +42,14 @@ for(;;) { print "Connect to $ARGV[0] failed"; exit(1); } + $fd1->setsockopt(SOL_SOCKET, SO_KEEPALIVE, 1); + my $fd2 = IO::Socket::INET->new(PeerAddr=>$ARGV[1]); if(!$fd2) { print "Connect to $ARGV[1] failed"; exit(1); } + $fd2->setsockopt(SOL_SOCKET, SO_KEEPALIVE, 1); $clients{$fd1}{fd} = $fd1; $clients{$fd2}{fd} = $fd2;