shutdown added to client code to avoid hangs

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1508 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-04-30 07:23:43 +00:00
parent 84cd3015c1
commit b73c1b68f9

View File

@ -294,6 +294,7 @@ if(int(@ARGV) == 2) {
$server = IO::Socket::INET->new(PeerAddr => $addr);
die "Can't connect to $addr\n" if(!$server);
syswrite($server, "$ARGV[1] ; quit\n");
shutdown($server, 1);
while(sysread($server, $buf, 256) > 0) {
print($buf);
}