esl / ejabberd_tests

23 stars 23 forks source link

Bosh and reconnects #24

Open arcusfelis opened 11 years ago

arcusfelis commented 11 years ago

Kate (with jid carol@localhost) sometimes receives this:

     {xmlel,<<"presence">>,
         [{<<"type">>,<<"unavailable">>},
          {<<"to">>,<<"carol@localhost/res1">>},
          {<<"from">>,<<"carol@localhost/res1">>}],
         [{xmlel,<<"status">>,[],
              [{xmlcdata,<<"Replaced by new connection">>}]}]}
alsuren commented 10 years ago

I managed to reproduce this reasonably reliably in my p1-google-queue-wip branch (and corresponding escalus branch), from memory. The problem is caused by a race between carol@localhost's resource[s] from the previous (failing) test being timed-out, and your current resource logging in.

Sometimes, you end up hitting the max_user_resources limit (default 10, from memory).

The error message in is a bit misleading. This should be fixed upstream, so that this failure mode is easier to debug (the new RFC even has a section on conflict resolution, if I remember correctly).