mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 10:46:53 +00:00
00_MQTT2_CLIENT.pm: fix msgAfterConnect bug (Forum #102032)
git-svn-id: https://svn.fhem.de/fhem/trunk@19784 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7446304981
commit
d79981e77c
@ -177,8 +177,8 @@ MQTT2_CLIENT_Disco($;$)
|
||||
RemoveInternalTimer($hash);
|
||||
$hash->{connecting} = 1 if(!$isUndef);
|
||||
my $ond = AttrVal($hash->{NAME}, "msgBeforeDisconnect", "");
|
||||
MQTT2_CLIENT_doPublish($hash, $2, $3, $1)
|
||||
if($ond =~ m/^(-r\s)?([^\s]*)\s*(.*)$/);
|
||||
MQTT2_CLIENT_doPublish($hash, $2, $3, $1, 1)
|
||||
if($ond && $ond =~ m/^(-r\s)?([^\s]*)\s*(.*)$/);
|
||||
MQTT2_CLIENT_send($hash, pack("C",0xE0).pack("C",0), 1); # DISCONNECT
|
||||
$isUndef ? DevIo_CloseDev($hash) : DevIo_Disconnected($hash);
|
||||
}
|
||||
@ -326,8 +326,8 @@ MQTT2_CLIENT_Read($@)
|
||||
if($hash->{connecting}) {
|
||||
delete($hash->{connecting});
|
||||
my $onc = AttrVal($name, "msgAfterConnect", "");
|
||||
MQTT2_CLIENT_doPublish($hash, $2, $3, $1)
|
||||
if($onc =~ m/^(-r\s)?([^\s]*)\s*(.*)$/);
|
||||
MQTT2_CLIENT_doPublish($hash, $2, $3, $1, 1)
|
||||
if($onc && $onc =~ m/^(-r\s)?([^\s]*)\s*(.*)$/);
|
||||
}
|
||||
|
||||
} elsif($cpt eq "PINGRESP") { # ignore it
|
||||
|
Loading…
x
Reference in New Issue
Block a user