Hello,
here's my usecase:
==
my java client tries to connect to the server
the server is not up, so i get a connection refused (from client boss)
the client tries to reconnect every 5 seconds to the server.
===
The issue is that i cannot use the same smartfox object to try to reconnect (erreor : A connection attempt is already running), i can't disconnect it because it's not connected and It doesn't try to reconnect itself on his own
So I create a new one, which later on creates some Threads from your thread pool (ie previous sfs are never garbage collected), the problem is that those threads are always reacheable from GC root and never desallocated. I end up with a clutter of useless thread waiting
Any idea how to achieve what I want to do ?
how to handle server connection failure and try again later
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Could you try to force bluebox to false - and see if that makes you able to reconnect?
sfs.setUseBlueBox(false)
I can see in the API that there connection flag isnt reset when it has the possibility to fallback to blue box.
/Thomas
sfs.setUseBlueBox(false)
I can see in the API that there connection flag isnt reset when it has the possibility to fallback to blue box.
/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Super - will add bug to bugtracker for the general case. Thanks for reporting
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 24 guests