Skip to content

Commit

Permalink
fix(mqtt5): keep old reference of connectFuture on reconnect (#1461)
Browse files Browse the repository at this point in the history
  • Loading branch information
junfuchen99 authored May 5, 2023
1 parent 3f52320 commit f3e5cda
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,9 @@ private synchronized void internalConnect() {
if (client != null) {
return;
}
connectFuture = new CompletableFuture<>();
if (connectFuture == null || connectFuture.isDone()) {
connectFuture = new CompletableFuture<>();
}
try (AwsIotMqtt5ClientBuilder builder = this.builderProvider.get()) {
long minReconnectSeconds = Coerce.toLong(mqttTopics.find("minimumReconnectDelaySeconds"));
long maxReconnectSeconds = Coerce.toLong(mqttTopics.find("maximumReconnectDelaySeconds"));
Expand Down

0 comments on commit f3e5cda

Please sign in to comment.