Subject: cannot reconnect after error
Alex,
I encounter the following situation:
- when the server is starting up, and client is in the process of connecting
- On BoshException error, client app closes the connection (see SND: </stream:stream>)
- however, next come server responses
- Matrix library continues with the login
- But, server, I think, does not response to "auth" message (probably seeing </stream:stream>)
- Once, this happens, I can't seem to close the XmppClient. ActiveStream is true, and calling Close() on XmppClient object does not seem to reset ActiveStream.
2012-10-12 10:23:57,402 [1] INFO CmXmpp.XmppPresenter - SND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="svr02001.uc.test.lab.com" version="1.0" >
2012-10-12 10:23:57,402 [1] INFO CmXmpp.XmppPresenter - OnCreateBoshSession
2012-10-12 10:23:57,667 [1] WARN CmXmpp.XmppPresenter - OnError(Matrix.Net.BoshException: BoshException ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at #=qKkdH6HdEGNHwG2LMdqeFqREb4CubSocdKOaCl4$aUkQ=.#=qoRllyUvp3L6$89m00OD_Mg==(IAsyncResult #=qQTD02PTcOGl0q$iYsfAPTg==)
--- End of inner exception stack trace ---)
2012-10-12 10:23:57,667 [1] INFO CmXmpp.XmppPresenter - XmppClient.Close() restart connection in 2105 milliseconds
2012-10-12 10:23:57,667 [1] INFO CmXmpp.XmppPresenter - SND: </stream:stream>
2012-10-12 10:23:57,683 [1] INFO CmXmpp.XmppPresenter - RCV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="svr02001.uc.test.lab.com" version="1.0" id="5294cb9b46e394c8fd70ffae6746acf9aea0d7ab" >
2012-10-12 10:23:57,683 [1] INFO CmXmpp.XmppPresenter - RCV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>PLAIN</mechanism>
</mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="yy7di5kE0syuCXOQTXNBTclpNTo=" />
<register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
2012-10-12 10:23:57,683 [1] INFO CmXmpp.XmppPresenter - SND: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">XXX</auth>
I encounter the following situation:
- when the server is starting up, and client is in the process of connecting
- On BoshException error, client app closes the connection (see SND: </stream:stream>)
- however, next come server responses
- Matrix library continues with the login
- But, server, I think, does not response to "auth" message (probably seeing </stream:stream>)
- Once, this happens, I can't seem to close the XmppClient. ActiveStream is true, and calling Close() on XmppClient object does not seem to reset ActiveStream.
2012-10-12 10:23:57,402 [1] INFO CmXmpp.XmppPresenter - SND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="svr02001.uc.test.lab.com" version="1.0" >
2012-10-12 10:23:57,402 [1] INFO CmXmpp.XmppPresenter - OnCreateBoshSession
2012-10-12 10:23:57,667 [1] WARN CmXmpp.XmppPresenter - OnError(Matrix.Net.BoshException: BoshException ---> System.Net.WebException: The remote server returned an error: (404) Not Found.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at #=qKkdH6HdEGNHwG2LMdqeFqREb4CubSocdKOaCl4$aUkQ=.#=qoRllyUvp3L6$89m00OD_Mg==(IAsyncResult #=qQTD02PTcOGl0q$iYsfAPTg==)
--- End of inner exception stack trace ---)
2012-10-12 10:23:57,667 [1] INFO CmXmpp.XmppPresenter - XmppClient.Close() restart connection in 2105 milliseconds
2012-10-12 10:23:57,667 [1] INFO CmXmpp.XmppPresenter - SND: </stream:stream>
2012-10-12 10:23:57,683 [1] INFO CmXmpp.XmppPresenter - RCV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="svr02001.uc.test.lab.com" version="1.0" id="5294cb9b46e394c8fd70ffae6746acf9aea0d7ab" >
2012-10-12 10:23:57,683 [1] INFO CmXmpp.XmppPresenter - RCV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
<mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
<mechanism>PLAIN</mechanism>
</mechanisms>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://www.process-one.net/en/ejabberd/" ver="yy7di5kE0syuCXOQTXNBTclpNTo=" />
<register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
2012-10-12 10:23:57,683 [1] INFO CmXmpp.XmppPresenter - SND: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">XXX</auth>