00_MQTT2_SERVER.pm: SUBACK-fix-fix (Forum #122978)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24982 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-09-16 16:25:40 +00:00
parent b0ddaeb535
commit f6d98e2ad2
2 changed files with 2 additions and 1 deletions

View File

@ -523,6 +523,7 @@ MQTT2_CLIENT_Read($@)
} else {
Log 1, "M2: Unhandled packet $cpt, disconneting $name";
MQTT2_CLIENT_Disco($hash);
return;
}
# Allow some IO inbetween, for overloaded systems

View File

@ -405,7 +405,7 @@ MQTT2_SERVER_Read($@)
push @ret, ($qos > 1 ? 1 : 0); # max qos supported is 1
}
# SUBACK
MQTT2_SERVER_out($hash, pack("CCnC*", 0x90, 3, $pid, @ret), $dump);
MQTT2_SERVER_out($hash, pack("CCnC*", 0x90, 2+@ret, $pid, @ret), $dump);
if(!$hash->{answerScheduled}) {
$hash->{answerScheduled} = 1;