[jdev] Detecting multiple resource connections
Jesus Cea
jcea at argo.es
Wed Apr 27 06:08:19 CDT 2005
Trejkaz wrote:
> At that point you might as well just use the two resources. Join
> from /checker, and if /bot isn't online, join from /bot and then disconnect
> from /checker. :-)
You will have race conditions, if your are running several processes.
> I assume that the default behaviour of jabberd2 is to boot off the existing
> session. I don't suppose there is a way to change that behaviour? It would
> result in a slightly more elegant solution (/bot logs in, fails, logs in
> as /bot2, done.)
I would suggest to "JEP" a non destructive bind. That is, if the
resource is already in use, the bind would fail.
But since a server can be hours with undetected failed connections,
perhaps a more sensible approach could be to bind with a random
resource, send a stanza to the demanded resource, and if the resource is
offline or not answers in X seconds, rebind to it.
--
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea at argo.es http://www.argo.es/~jcea/ _/_/ _/_/ _/_/ _/_/ _/_/
_/_/ _/_/ _/_/_/_/_/
PGP Key Available at KeyServ _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
More information about the JDev
mailing list