Hi,
I am currently testing smack 4.1.2 and encountered an exception when testing consecutive connection and disconnections
for (int i=1; i<50; i++) {
conn.connect();
if (!conn.isAuthenticated())
conn.login(“myUser”, “password”, “smack4test”);
conn.disconnect();
}
It seems that there is a race condition so that the roster implementation waits from a response of an already closed connection (connection closed before the roster was completely fetched?).
Jul 03, 2015 10:18:53 AM org.jivesoftware.smack.roster.Roster$3 processException
SEVERE: Exception reloading roster
org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 5000ms (~5s). Used filter: IQReplyFilter: iqAndIdFilter (AndFilter: (OrFilter: (IQTypeFilter: type=error, IQTypeFilter: type=result), StanzaIdFilter: id=5y342-7)), : fromFilter (OrFilter: (FromMatchesFilter (full): null, FromMatchesFilter (bare): myUser@myserver, FromMatchesFilter (full): myserver)).
at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackExceptio n.java:106)
at org.jivesoftware.smack.AbstractXMPPConnection$6.run(AbstractXMPPConnection.java :1443)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201 (Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknow n Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Best Regards,
Ingo