I made a patch to ReconnectionManager.java class to avoid that more than one Smack Reconnection Manager thread run at the same time.
My patch also fix a bug in the delay between reconnection (it always wait 10 seconds because the attempts variable is not incremented). I also modified the function to wait a random time to avoid server to be rushed when there is a downtime.
i have patched it with the randomize time interval. i think its necessary if your server went down and the most of your clients use smack, after 10 seconds all of the clients will send connection attempts that could cause a server crash.
Robin Collier March 30, 2011 at 2:56 PM
Go ahead and commit it without the randomized bit, unless you can think of a good reason to have it.
Holger Bergunde March 30, 2011 at 1:45 PM
i patched it manually on my local machine. should i commit it without the randomized time interval or do you want to patch it by your own?
Robin Collier March 30, 2011 at 1:43 PM
The patch seems simple enough, but I don't see any need for the randomized time interval. Seems to just add complexity to the code for no benefit.
I made a patch to ReconnectionManager.java class to avoid that more than one Smack Reconnection Manager thread run at the same time.
My patch also fix a bug in the delay between reconnection (it always wait 10 seconds because the attempts variable is not incremented). I also modified the function to wait a random time to avoid server to be rushed when there is a downtime.