Not logged in. · Lost password · Register
Forum: MatriX RSS
Issue to see if the connection was lost.
Avatar
Marco33 #1
Member since Jan 2011 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Issue to see if the connection was lost.
Hello, I have the following problem ... when the server connection is lost, I need to try to reconnect the user. But my problem is in determining when this occurs. I've tried using OnClose however it does not work once he is fired soon after the connection to the server ... even while the server is stable.
Are there any other way to check if the connection is stable without the iteration of the user?
Or is there any way to make a Auto-Login to this case?

Thanks.
Avatar
Alex #2
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you should get an OnClose when you get disconnected. When you don't get it and the problem is reproducable then please describe me the steps how to cause the problem or attach a test case. Then I'll try to cause it and there the bugs if there are any.

You should not reconnect directly in the OnClose event. This can cause a race condition. Try to use a timer and reconnect after about 10 seconds. Because when you get the OnClose there is some problem, and its not likely that you can reconnect immediately.

Do you have the latst binary from the binary download section?

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: MatriX RSS