Problem with resuming session with Strophe and Ejabberd

I have a lot of difficulties when I work on the "attach ()" function.

I work in a social network where users will browse pages and at the same time keep in touch chat. I don’t want to reconnect / re-login on every page, so this link http://groups.google.com/group/strophe/browse_thread/thread/430da5e788278f3a/93c48c88164f382f?show_docid=93c48c88164f382f&fwc=1 , I store SID and RID and IID in cookie onunload.

On the next page, when I try to use the new SID and RID (after increasing by 1) my session is already destroyed. Ejabberd reports "Error in the HTTP message. Reason: bad_key"

WTF going on?

+3
source share
2 answers

I managed to solve the problem.

Elimination doubled between page loads. Increasing it only after the session application starts working.

I don’t know why the session was canceled, but here is what happened:

  • Since the RID is +2 higher than the previous ones, ejabberd saves the request in the buffer and does not pass it to clients
  • The next 2 queries are also saved.
  • After that ejabberd cancels the session

Any clues?

+1
source

ejabberd Firebug . RID cookie? ejabberd - , , RID? RID ? ?

: BOSH. SID RID . , . , RID . RID RID, . (RID, RID + 5).

+5

Source: https://habr.com/ru/post/1740638/


All Articles