Skip to content

Commit

Permalink
Merge pull request #46269 from geoand/#46268-take2
Browse files Browse the repository at this point in the history
Avoid creating a timer when reconnectDelay is set to Max
  • Loading branch information
geoand authored Feb 14, 2025
2 parents 3c19a78 + 0ca3ed8 commit 4e5050f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private synchronized void close(boolean clientClosed) {
timerId = -1;
}
// schedule a new reconnect if the client closed us
if (clientClosed) {
if (clientClosed && reconnectDelay != Integer.MAX_VALUE) {
timerId = vertx.setTimer(TimeUnit.MILLISECONDS.convert(reconnectDelay, reconnectUnit), this);
}
}
Expand Down

0 comments on commit 4e5050f

Please sign in to comment.