Ticket #52 (closed defect: wontfix)

Opened 20 months ago

Last modified 3 months ago

Error Handling

Reported by: itstimeforanap Owned by: zeank
Priority: normal Milestone: jsjac-1.3.2
Component: jsjac Version: 1.3
Severity: normal Keywords: error handling
Cc:

Description

I'm trying to distinguish between errors with xmpp. One error is multiple login with the same resource and the other is when you try to shutdown the ejabberd server that the bind is connected to. For the multiple login, if you register to the 'onerror' event other errors seems to get grouped together with the error code '503'. Is there a way to distinguish further? With the shutdown of the server, there doesn't seem to be an event tied to this. I also noticed that with debugging on, there seems to be distinct logged xml messages for this. Is there a way to get this through the exposed interface of jsjac?

Below are the logged xml:

Multiple resource login

<body type='terminate' condition='remote-stream-error' xmlns='http://jabber.org/protocol/httpbind'> <conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'/> <text xml:lang= xmlns='urn:ietf:params:xml:ns:xmpp-streams'>Replaced by new connection</text> </body>

Forced server shutdown

<body type='terminate' xmlns='http://jabber.org/protocol/httpbind'/>

Change History

Changed 17 months ago by jasenj1

Have you tried registering a handler for the "conflict" packets? Try: con.registerHandler('onerror', 'conflict', handleConflict);

Changed 12 months ago by zeank

  • status changed from new to closed
  • resolution set to wontfix

also you could check con.getStatus() in this situation to differentiate between those conditions

Note: See TracTickets for help on using tickets.