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 a68c983072
commit ec392475b5

View File

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