25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

If new session Pid exists when sm_remove is called, then keep Ping (#3260)

This commit is contained in:
Badlop 2020-05-11 17:37:00 +02:00
parent e286bb23db
commit 5e70a47f20

View File

@ -184,7 +184,14 @@ user_online(_SID, JID, _Info) ->
-spec user_offline(ejabberd_sm:sid(), jid(), ejabberd_sm:info()) -> ok. -spec user_offline(ejabberd_sm:sid(), jid(), ejabberd_sm:info()) -> ok.
user_offline(_SID, JID, _Info) -> user_offline(_SID, JID, _Info) ->
stop_ping(JID#jid.lserver, JID). case ejabberd_sm:get_session_pid(JID#jid.luser,
JID#jid.lserver,
JID#jid.lresource) of
none ->
stop_ping(JID#jid.lserver, JID);
_ ->
ok
end.
-spec user_send({stanza(), ejabberd_c2s:state()}) -> {stanza(), ejabberd_c2s:state()}. -spec user_send({stanza(), ejabberd_c2s:state()}) -> {stanza(), ejabberd_c2s:state()}.
user_send({Packet, #{jid := JID} = C2SState}) -> user_send({Packet, #{jid := JID} = C2SState}) ->