I love how robust the reconnection is, however if connections fail repeatedly, then the default of attempting every 0.5 seconds is going to hammer a struggling server.
If the reason that the connection is failing is a server in trouble, then this potentially adds something close to a denial of service attack on top of whatever problem exists...
Standard practice would be an exponential fallback - so, waiting (twice?, 1.5x?) as long between each reconnection attempt.
Perhaps to a maximum of a 60 second delay between checks...
I'm happy to have a go if you'd accept a pull request...
I love how robust the reconnection is, however if connections fail repeatedly, then the default of attempting every 0.5 seconds is going to hammer a struggling server.
If the reason that the connection is failing is a server in trouble, then this potentially adds something close to a denial of service attack on top of whatever problem exists...
Standard practice would be an exponential fallback - so, waiting (twice?, 1.5x?) as long between each reconnection attempt.
Perhaps to a maximum of a 60 second delay between checks...
I'm happy to have a go if you'd accept a pull request...