trainux Posted June 26, 2018 Share Posted June 26, 2018 Error to auto start session with A Simple Login Handler after the connection fell a few seconds. The system initiates session with this API perfectly, but when the connection is dropped and the system is re-established, it does not detect that a user is not logged in and does not perform the auto-login. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted June 26, 2018 Share Posted June 26, 2018 Maybe didn't execute the event properly Quote Link to comment Share on other sites More sharing options...
trainux Posted June 26, 2018 Author Share Posted June 26, 2018 7 hours ago, FrostBug said: Maybe didn't execute the event properly Here as I have the code. LoginEvent loginEvent; @Override public int onLoop() throws InterruptedException{ if(!getClient().isLoggedIn()) { loginEvent = new LoginEvent(usuario,clave); getBot().addLoginListener(loginEvent); execute(loginEvent); }else { doTasks(); } return 1000; } It is assumed that onLoop() is repeated in an interval as indicated in the "return", in this case 1 second. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted June 26, 2018 Share Posted June 26, 2018 (edited) 16 minutes ago, trainux said: Here as I have the code. LoginEvent loginEvent; @Override public int onLoop() throws InterruptedException{ if(!getClient().isLoggedIn()) { loginEvent = new LoginEvent(usuario,clave); getBot().addLoginListener(loginEvent); execute(loginEvent); }else { doTasks(); } return 1000; } It is assumed that onLoop() is repeated in an interval as indicated in the "return", in this case 1 second. The login handler seems to pause the ScriptExecutor. This would conflict with the fact that it's also a ResponseCode listener, as the ResponseCode listeners (I believe) are invoked between calls to onLoop (which will not happen when ScriptExecutor is paused). Perhaps it's outdated. Edited June 26, 2018 by FrostBug Quote Link to comment Share on other sites More sharing options...
trainux Posted June 26, 2018 Author Share Posted June 26, 2018 54 minutes ago, FrostBug said: The login handler seems to pause the ScriptExecutor. This would conflict with the fact that it's also a ResponseCode listener, as the ResponseCode listeners (I believe) are invoked between calls to onLoop (which will not happen when ScriptExecutor is paused). Perhaps it's outdated. any solution? Quote Link to comment Share on other sites More sharing options...