mirror of
https://github.com/fhem/fhem-mirror.git
synced 2024-11-22 02:59:49 +00:00
keepalive added
git-svn-id: https://svn.fhem.de/fhem/trunk@2785 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3a52eb2c87
commit
97c57ffd35
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user