How long does an XMPP session last?

No timeout? Or is there even a timeout?

+4
source share
2 answers

There is no limit to the lifetime of a related jid. For command line bots, it is recommended to send periodic ping packets to the server to make sure that the open socket does not fall after a period of inactivity.

In case your client is connected from the browser and suppose the user updates the browser without disconnecting from the jabber server. The user can use the saved (via cookie / session) jid, sid, rid combination to reconnect to a previously opened session. However, the bosh connection manager will disconnect after “X” seconds of inactivity.

+2
source

XMPP says nothing about the presence or absence of a timeout. So, theoretically, an XMPP session can continue as long as a TCP connection is established.

You can implement a timeout on your client or server, though ...

+1
source

All Articles