candy-chat / candy

JavaScript-based multi-user chat client for XMPP.
http://candy-chat.github.io/candy
MIT License
1.33k stars 370 forks source link

Candy should respond to XMPP application-level pings (XEP-0199) #517

Open michalrus opened 6 years ago

michalrus commented 6 years ago

https://xmpp.org/extensions/xep-0199.html

Currently, it doesn’t, and the client is disconnected by a server that requires this.

lkraav commented 6 years ago

@michalrus example of such server?

I'm running on Openfire, and haven't noticed any unnatural disconnects.

michalrus commented 6 years ago

@lkraav any Ejabberd with this in its config:

          mod_ping:
            send_pings: true
            ping_interval: 20
            ping_ack_timeout: 20
            timeout_action: kill

Cf. https://docs.ejabberd.im/admin/configuration/#mod-ping

lkraav commented 6 years ago

OK. You should know this project development has stopped to a halt, any quick solution probably not available any time soon.

I'm thinking about moving to Mattermost, instead. There's simply no comparable quality XMPP solutions out there.

EDIT AUG 2018 I've migrated to Mattermost and as expected, it's a ton better experience.

michalrus commented 6 years ago

Also, as an example, Converse.js does respond to pings: https://github.com/conversejs/converse.js/pull/414

guusdk commented 6 years ago

As an aside: Openfire will try to ping the client if it suspects that it is disconnected. Please note that an XMPP client (such as Candy) is required to answer to every IQ request (which the ping request is), with either an answer, or an error ("I don't understand this request"). For the purpose of checking if the client is still alive, receiving the error is good enough: "Are you there?" -"Que?" (ok, you're there).