I made a game which uses SFS and everything runs just fine....
EXCEPT when I do the following :
1.) Shut down the SFS server (so it's not running)
2.) Run my game
3.) My game calls "sfs.loadConfig();"
4.) The client can see "SFSEvent.CONFIG_LOAD_SUCCESS" was fired
5.) After 15 seconds or so the game recents the event "SFSEvent.CONNECTION" where "evt.params.success" = false (so the connection failed.)
Above is what you'd expect, the server isn't running so it should clearly fail.
However, I added a feature to my game where if this happens, a popup window appears with a "Reconnect" button. Clicking the reconnect button will make another call to "sfs.loadConfig();" (which I am assuming will make another attempt to connect to the server.)
So, when I see the reconnect button, I start the SFS service. So, SFS is now running.
When I click on the reconnect button, I see the "SFSEvent.CONFIG_LOAD_SUCCESS" fire. I also see this in the server log :
Code: Select all
08 Feb 2012 11:18:26,062 INFO [SocketReader] bitswarm.core.SocketAcceptor - Session created: { Id: 1, Type: DEFAULT, Logged: No, IP: my_ap_address:40336 } on Server port: 9933 <---> 40336
So the game makes a connection to the server.... however, it ends there... no "SFSEvent.CONNECTION" event is fired.... nothing... it sits there indefinately....
After 15 seconds or so the server does this :
Code: Select all
08 Feb 2012 11:18:53,421 INFO [Scheduler1-thread-1] bitswarm.sessions.DefaultSessionManager - Session removed: { Id: 1, Type: DEFAULT, Logged: No, IP: my_ap_address:40336 }
So it removes the session. No events are fired to the client.
What am I missing?
Thanks!!