Subject: XMPP connection stream becoming inactive very often.
We are getting the error "Matrix.XmppStreamException: Unable to send data. The XMPP Stream is inactive" when we are trying to Discover a PubSub node or when we are publishing a message to PubSub node. We are getting this issue very often and not sure how to proceed.
Please find below the code that we use to open a connection : -
Please find below the code that we use to open a connection : -
- response.Type = IQType.error;
- xmppConnection.SetXmppDomain("#Server");
- xmppConnection.SetUsername("#Admin User name");
- xmppConnection.Password = "#Password";
- xmppConnection.KeepAliveInterval = 30;
- xmppConnection.OnLogin += delegate(object sender, Matrix.EventArgs e)
- {
- logger.Information("Open new connection : Success.");
- wait.Set();
- };
- xmppConnection.OnError += delegate(object sender, Matrix.ExceptionEventArgs e)
- {
- logger.Error("OnError message : "+ e.Exception);
- wait.Set();
- };
- xmppConnection.OnAuthError += delegate(object sender, Matrix.Xmpp.Sasl.SaslEventArgs e)
- {
- logger.Error("OnAuthError message : " + e.Exception);
- wait.Set();
- };
- xmppConnection.Open();
- wait.WaitOne();