Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
hexin #1
User title: to search knowledge
Member since Mar 2007 · 34 posts · Location: China
Group memberships: Members
Show profile · Link to this post
Subject: how to deal with network disconnection error?
I have logged in the Mini client.But sometime, because of the unsteadiness of network,  the Client to IM server connections will be intermitted. In the programe, i let the client detect networke  state repeatly like msn,once it is available, connect client to IM server again.But there is a problem, when logging in,the Mini client prompt 'the user is already online'. Also there is a error happen. The error is as follow:


System.IO.Exception:can't write data to transport connection,can't access disposed object
object name:“System.Net.Sockets.Socket”??->System.ObjectDisposeException:
At  System.Net.Sockets.Socket.BeginSend(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, SocketError& errorCode, AsyncCallback callback, Object state)
At System.Net.Sockets.Socket.BeginSend(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
At System.Net.Sockets.NetworkStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
---end of internal abnormal stack track ---
At System.Net.Sockets.NetworkStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
At agsXMPP.net.ClientSocket.Send(Byte[] bData)


the IM server we used is openfire. when the network is unavailable, and is available for a while. I examine the IM server, it show i'm online, so when i'm logging in, the problems i described above happen. why does that happen? how to resolve it?
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

You are trying to send data while you are not connected to the server.

If you loose the connection there should be a disconnect in agsXMPP. when you have a network connection again you have to reconnect manually, and not send any data until you are connected again.

Check also if you use the latest code from SVN.

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:
Forum: agsXMPP RSS