Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
HelterSkelter #1
Member since Mar 2017 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Error on Reconnect
Hi Guys!

I'm getting this error when the app try to reconnect:

at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Matrix.Xml.Xpnet.NamespaceStack.Init()
   at Matrix.Xml.XmppStreamParser.Reset()
   at Matrix.XmppStream.CleanupSession()
   at Matrix.Xmpp.Client.XmppClient.CleanupSession()
   at Matrix.XmppStream.socket_OnDisconnect(Object sender, EventArgs e)
   at Matrix.Net.BaseSocket.FireOnDisconnect()
   at Matrix.Net.ClientSocket.Disconnect()
   at Matrix.Net.ClientSocket.Send(Byte[] bData)
   at Matrix.XmppStream.SendData(String xml)
   at Matrix.XmppStream.Send(String xml)
   at Matrix.XmppStream.KeepAliveTick(Object state)
   at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireQueuedTimerCompletion(Object state)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

I think it's a problem in the library(MatriX.2.0.0.21) but could be in my code?

The error it's been raised after made a Close() and then an Open().

Regards.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
  • are you waiting until you get the OnClose event?
  • Have you tried to create a complete new XmppClient object for your new connection?
Avatar
HelterSkelter #3
Member since Mar 2017 · 2 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex!

Yes, we are handling the OnClose event.
The problem looks like is raised by some users wich suspend their devices or loose their internet connectivity and when the app try to reconnect have that error. The error is not present every time in every device but the cases are enought to take it in care.

Best regards.
This post was edited on 2017-03-16, 15:01 by HelterSkelter.
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: