Reconnection Manager can be running twice

Description

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.

Environment

None

Attachments

1

is duplicated by

is related to

Activity

Robin Collier March 31, 2011 at 11:28 AM

Sounds good, and it makes sense.

Holger Bergunde March 31, 2011 at 6:39 AM

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.

Fixed

Details

Assignee

Reporter

Ignite Forum URL

Components

Affects versions

Priority

Created September 21, 2010 at 11:56 AM
Updated October 28, 2020 at 1:28 PM
Resolved March 31, 2011 at 6:39 AM