Fix retained message is not sent for Subscribe to existing topic
This commit is contained in:
parent
c87c49ede0
commit
586c3a243a
|
@ -394,9 +394,9 @@ handle_cast({subscribe, _From, TopicTable, AckFun},
|
||||||
maps:put(Topic, NewQos, SubMap);
|
maps:put(Topic, NewQos, SubMap);
|
||||||
error ->
|
error ->
|
||||||
emqttd:subscribe(Topic, ClientId, Opts),
|
emqttd:subscribe(Topic, ClientId, Opts),
|
||||||
emqttd_hooks:run('session.subscribed', [ClientId, Username], {Topic, Opts}),
|
|
||||||
maps:put(Topic, NewQos, SubMap)
|
maps:put(Topic, NewQos, SubMap)
|
||||||
end,
|
end,
|
||||||
|
emqttd_hooks:run('session.subscribed', [ClientId, Username], {Topic, Opts}),
|
||||||
{[NewQos|QosAcc], SubMap1}
|
{[NewQos|QosAcc], SubMap1}
|
||||||
end, {[], Subscriptions}, TopicTable),
|
end, {[], Subscriptions}, TopicTable),
|
||||||
AckFun(lists:reverse(GrantedQos)),
|
AckFun(lists:reverse(GrantedQos)),
|
||||||
|
|
Loading…
Reference in New Issue