24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-04 21:27:16 +02:00

Make bounce_message_queue wait for 100ms for incoming messages

There is possibilty that between c2s process unregistering itself from sm
and terminating, some other process could try to send something to c2s,
which could result in messages to triggering mam/offline hooks, and causing
them not to be stored in any way.
This commit is contained in:
Paweł Chmielowski 2020-03-23 15:16:33 +01:00
parent 97354426cf
commit 7caec56e96

View File

@ -902,7 +902,7 @@ bounce_message_queue({_, Pid} = SID, JID) ->
receive {route, Pkt} ->
ejabberd_router:route(Pkt),
bounce_message_queue(SID, JID)
after 0 ->
after 100 ->
ok
end
end.