From eaff0ec76a739f09e561ddd7c4260d3f22dc03f6 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@2785 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/et_client.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fhem/contrib/et_client.pl b/fhem/contrib/et_client.pl index 5467a55c8..bd3a2924e 100644 --- a/fhem/contrib/et_client.pl +++ b/fhem/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;