Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
nbhatt #1
Member since Aug 2011 · 4 posts · Location: USA
Group memberships: Members
Show profile · Link to this post
Subject: Application hangs after getting a 404 from server
After leaving application idle for a long time, sometimes I see the server throws back a 404, Invalid SID. The client does not reconnect or sends an error back when this happens. Is there an event that I can add handler to, so that I can close the XMPP connect and open a new one in my application.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
are you using the latest binary? We improved the error handling in the last weeks for this.
When you are on BOSH MatriX does not send keep alives. When your server kills idle connections then I suggest to send xmpp pings to your server when the connection is idle for a while to prevent the disconnects.

Alex
Avatar
nbhatt #3
Member since Aug 2011 · 4 posts · Location: USA
Group memberships: Members
Show profile · Link to this post
I just updated to the new binary and see how it works with the new binary. Also I have set AutoReplyToPing = TRUE and keep alive interval to 30 seconds. Is there something else that I should be sending ?
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
KeepAlive interval is ignored on BOSH connections, so it does nothing. When the new binary does not help I suggest to send a Xmpp Ping packet e.g. every 2 minutes from your client.

  1. xmppClient.Send(new PingIq{To = xmppClient.XmppDomain, Type = IqType.get});

Alex
Avatar
nbhatt #5
Member since Aug 2011 · 4 posts · Location: USA
Group memberships: Members
Show profile · Link to this post
In reply to post #1
We want to implement out own connect/reconnect logic in the client application when we get an error from the server. Basically is there an event handler that we can register so that we can get respond to server errors in our client application.

Also can we add a generic handler for HTTP status that we get back for HTTP bind requests.
This post was edited on 2011-08-24, 18:34 by nbhatt.
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You should always get the OnClose event whenever MatriX detects a disconnect. Before the OnClose there could be an OnError event, but always followed by the OnClose. When there was no OnClose then MatriX the connection is still alive.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: