mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
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:
parent
84cd3015c1
commit
b73c1b68f9
1
fhem.pl
1
fhem.pl
@ -294,6 +294,7 @@ if(int(@ARGV) == 2) {
|
|||||||
$server = IO::Socket::INET->new(PeerAddr => $addr);
|
$server = IO::Socket::INET->new(PeerAddr => $addr);
|
||||||
die "Can't connect to $addr\n" if(!$server);
|
die "Can't connect to $addr\n" if(!$server);
|
||||||
syswrite($server, "$ARGV[1] ; quit\n");
|
syswrite($server, "$ARGV[1] ; quit\n");
|
||||||
|
shutdown($server, 1);
|
||||||
while(sysread($server, $buf, 256) > 0) {
|
while(sysread($server, $buf, 256) > 0) {
|
||||||
print($buf);
|
print($buf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user