If i start my smartfoxserver... everything works fine. Users can connect and login and everything works as it should.
However, I finally got around to testing at login that their username/password matches what i have in my database. I do this in my "LoginEventHandler" server side.
If they have an invalid username/password, I throw an error :
Code: Select all
SFSErrorData data = new SFSErrorData(SFSErrorCode.GENERIC_ERROR);
data.addParameter("Error id 1");
throw new SFSLoginException("Invalid Password.", data);
The client gets the error message and everything seems fine.
However, after entering invalid credentials a few times.... the server appears to hang... No one is able to log in anymore. I have to restart the server at this point to get it working again.
When it is hung, I notice the following :
1.) If a user tries to connect, they are successful.
2.) Client then sends login request.
3.) Server receives request and does nothing.... I have a "trace" at the top of the "LoginEventhandler" and it doesn't appear in the server log.
Here is what I see in the server log when someone tries to connect :
Code: Select all
08 Feb 2012 07:48:58,593 INFO [SocketReader] bitswarm.core.SocketAcceptor - Session created: { Id: 25, Type: DEFAULT, Logged: No, IP: ip_address:30387 } on Server port: 9933 <---> 30387
08 Feb 2012 07:48:58,593 INFO [com.smartfoxserver.v2.controllers.SystemController-1] v2.controllers.SystemController - {IN}: Handshake
08 Feb 2012 07:48:58,687 INFO [com.smartfoxserver.v2.controllers.SystemController-1] v2.controllers.SystemController - {IN}: Login
And normally at this point I see all my traces... instead it sits here and does nothing for maybe 15 seconds.... then the server disconnects the user.... you see this on the server log.
Code: Select all
08 Feb 2012 07:49:20,390 INFO [SocketReader] bitswarm.sessions.DefaultSessionManager - Session removed: { Id: 25, Type: DEFAULT, Logged: No, IP: ip_address:30387 }
08 Feb 2012 07:49:20,390 INFO [SocketReader] bitswarm.core.SocketReader - Socket closed: java.nio.channels.SocketChannel[closed]
08 Feb 2012 07:49:20,390 INFO [Scheduler1-thread-1] bitswarm.sessions.DefaultSessionManager - Session removed: { Id: 25, Type: DEFAULT, Logged: No, IP: ip_address:30387 }
Like I mentioned earlier, every user is unable to log in until i restart the server.
Any ideas?
Thanks!