Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression on #3260 #3817

Closed
fdie opened this issue May 17, 2022 · 1 comment
Closed

Regression on #3260 #3817

fdie opened this issue May 17, 2022 · 1 comment

Comments

@fdie
Copy link
Contributor

fdie commented May 17, 2022

Regression on #3260

The stop_ping should not be saved in a clustering context since sessions may be on different nodes.

diff --git a/src/mod_ping.erl b/src/mod_ping.erl
index 2ee5133fa..825acf2cd 100644
--- a/src/mod_ping.erl
+++ b/src/mod_ping.erl
@@ -203,7 +203,7 @@ user_offline(_SID, JID, _Info) ->
     case ejabberd_sm:get_session_pid(JID#jid.luser,
                                      JID#jid.lserver,
                                      JID#jid.lresource) of
-        none ->
+        PID when PID =:= none; node(PID) /= node() ->
             stop_ping(JID#jid.lserver, JID);
         _ ->
             ok
@badlop
Copy link
Member

badlop commented May 23, 2022

Thanks for reporting!

@badlop badlop closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants