2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

00_MQTT2_SERVER.pm: ignore lwt on auth error (Forum #121587)

git-svn-id: https://svn.fhem.de/fhem/trunk@24639 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2021-06-15 18:35:51 +00:00
parent 396909cf95
commit 64b54f63d9

View File

@ -361,6 +361,7 @@ MQTT2_SERVER_Read($@)
my $ret = Authenticate($hash, "basicAuth:".encode_base64("$usr:$pwd")); my $ret = Authenticate($hash, "basicAuth:".encode_base64("$usr:$pwd"));
if($ret == 2) { # CONNACK, Error if($ret == 2) { # CONNACK, Error
delete($hash->{lwt}); # Avoid autocreate, #121587
return MQTT2_SERVER_out($hash, pack("C*", 0x20, 2, 0, 4), $dump, return MQTT2_SERVER_out($hash, pack("C*", 0x20, 2, 0, 4), $dump,
sub{ CommandDelete(undef, $hash->{NAME}); }); sub{ CommandDelete(undef, $hash->{NAME}); });
} }