On 14 June 2013 09:16, Vineet Naik <nai...@gmail.com> wrote:Hmm. As far as I know, ejabberd handles out-of-order requests (this is
> Hello,
>
> I am working on a one-to-one chat app using Strophe 1.0.2,
> ejabberd 2.1.10 over BOSH (proxied by apache2) and facing the
> problem that when messages are sent quickly, the rids sent with
> the http bind requests get out of order and the session is
> terminated. This happens rather frequently and thus can be
> reproduced easily (tried on Chrome and FF). The problem is
> similar to the one described in this older post -
> https://groups.google.com/forum/?fromgroups#!topic/strophe/cUG6cQnSiLM
described in the BOSH XEP). However the server is only required to
allow requests within a certain fixed window. Generally he client is
not supposed to have more than 2 outstanding requests at any time.
From your data, can you see if Strophe is violating this?
If it is, it's a problem with Strophe - it should hold onto outgoing
messages until it receives a response from the server, then it can
make a new request.
If it isn't, it's a problem with ejabberd - it
shouldn't process the second request until it has received the first.
Regards,
Matthew
--
You received this message because you are subscribed to the Google Groups "Strophe" group.
To unsubscribe from this group and stop receiving emails from it, send an email to strophe+u...@googlegroups.com.
To post to this group, send email to str...@googlegroups.com.
Visit this group at http://groups.google.com/group/strophe.
For more options, visit https://groups.google.com/groups/opt_out.
I'm not sure if this matters or not, but what "hold" value are you using in your BOSH session?
> The problem is, periodically a request is marked as cancelled but StropheIs this someone hitting escape? That can cancel XHR requests I think.
> goes
> ahead and sends further messages and after a while tries to resend the
> cancelled one.
> Also, I tested a bit more on FF and found that it doesn't always resend the
> cancelled
> request but Chrome always does. Can this be a browser issue?
Canceled or failed requests are fine. Strophe will try to the resend
them, and this is ok. The BOSH spec allows for this, because there are
network conditions under which the client cannot know if the server
has or has not processed the message. The server is supposed to
respond with the exact same content it did before if it sees a
duplicate request. Note that there is a bounded window of RIDs where
this behavior is valid.
Are you using current master? If not, you should be. The released
version is probably quite old. Someone should do a new release of
master.
jack.