00_MQTT2_CLIENT.pm: better handling of close (Forum #103717)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20184 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-09-17 16:25:01 +00:00
parent 71a0b3c439
commit 17153fb509

View File

@ -290,7 +290,10 @@ MQTT2_CLIENT_Read($@)
if(!$reread) {
my $buf = DevIo_SimpleRead($hash);
return "" if(!defined($buf));
if(!defined($buf)) {
MQTT2_CLIENT_Disco($hash);
return "";
}
$hash->{BUF} .= $buf;
}