Don't reschedule connection attempts if interrupted

Description

If we get interrupted in AbstractReconnectionHandler#run, we abort the current attempt but keep scheduling the next reconnection:

We don't need to reschedule. There are two ways we can be interrupted:

  1. the pool (i.e. the whole Cluster) is shutting down.

  2. the client cancelled reconnection attempts with host.getReconnectionAttemptFuture().cancel(true). In that case the next scheduled attempt will immediately detect the cancellation and abort the reconnection process.

The current code does not cause any issue, but it schedules an unnecessary attempt in case #2 (we could abort right away instead of scheduling a task that will).

Environment

None

Pull Requests

None
Fixed

Assignee

Kevin Gallardo

Reporter

Olivier Michallat

Labels

PM Priority

None

Reproduced in

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Trivial