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);
|
||||
error ->
|
||||
emqttd:subscribe(Topic, ClientId, Opts),
|
||||
emqttd_hooks:run('session.subscribed', [ClientId, Username], {Topic, Opts}),
|
||||
maps:put(Topic, NewQos, SubMap)
|
||||
end,
|
||||
emqttd_hooks:run('session.subscribed', [ClientId, Username], {Topic, Opts}),
|
||||
{[NewQos|QosAcc], SubMap1}
|
||||
end, {[], Subscriptions}, TopicTable),
|
||||
AckFun(lists:reverse(GrantedQos)),
|
||||
|
|
Loading…
Reference in New Issue