You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Motivation
There is a sequence of conditions that can trigger a client to schedule multiple reconnections to the broker. This is due to fact that we're not checking whether such an attempt is already in progress.
example:
1. Receive `CloseConsumer` command from broker
1a. Schedule for reconnection in 100ms
2. Connection is closed (eg: broker shutdown has initiated)
2a. Schedule for reconnection in 200ms (since the backoff was already incremented)
Result is that we're going to call `grabCnx()` twice
### Modifications
Use atomic flag to ignore the 2nd attempt, just waiting for the 1st attempt to finish.
0 commit comments