Subject: XMPP Presence update when closing client over BOSH
Hi,
I'm noticing that when using the MatriX XMPP client over BOSH, the unavailable presence update that is meant to be sent from the MatriX client when the Close method is called doesn't always occur. I used Fiddler to trace the output and what I noticed was that in the cases where it worked fine, the Fiddler trace has something along the lines of:
But in cases where it didn't work, the OnClose event callback wasn't fired (which I use to hook-up the application shutdown) and the Fiddler output did not contain any <type="terminate">. I've checked with our clients and their server team, and Openfire does not receive any of the terminate events either.
I've tried extending the time I wait for the OnClose event to fire before shutting the application down, but this doesn't seem to help. I can confirm that we are calling the Close method on the XmppClient.
What should be the correct way to close a Silverlight client and ensure the XMPP API has chance to tear-down, flush any queues and send any messages?
Cheers,
Rob
I'm noticing that when using the MatriX XMPP client over BOSH, the unavailable presence update that is meant to be sent from the MatriX client when the Close method is called doesn't always occur. I used Fiddler to trace the output and what I noticed was that in the cases where it worked fine, the Fiddler trace has something along the lines of:
- <body xmlns:xmpp="urn:xmpp:xbosh" xmlns:stream="http://etherx.jabber.org/streams" rid="987513757" key="636c48127d2539bbfc3d1772b63f299e21efaca8" sid="e3ed05a7" to="lbg.arena" type="terminate" xmlns="http://jabber.org/protocol/httpbind" />
But in cases where it didn't work, the OnClose event callback wasn't fired (which I use to hook-up the application shutdown) and the Fiddler output did not contain any <type="terminate">. I've checked with our clients and their server team, and Openfire does not receive any of the terminate events either.
I've tried extending the time I wait for the OnClose event to fire before shutting the application down, but this doesn't seem to help. I can confirm that we are calling the Close method on the XmppClient.
What should be the correct way to close a Silverlight client and ensure the XMPP API has chance to tear-down, flush any queues and send any messages?
Cheers,
Rob