Skip to content

Commit

Permalink
Fix potential busy loop during reconnectMode
Browse files Browse the repository at this point in the history
Signed-off-by: Maurice van Veen <[email protected]>
  • Loading branch information
MauriceVanVeen committed Aug 20, 2024
1 parent a6ef493 commit 3f1c822
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void sendMessageBatch(NatsMessage msg, DataPort dataPort, StatisticsCollector st
@Override
public void run() {
Duration waitForMessage = Duration.ofMinutes(2); // This can be long since no one is sending
Duration reconnectWait = Duration.ofMillis(1); // This should be short, since we are trying to get the reconnect through
Duration reconnectWait = Duration.ofMillis(100); // This should be short, since we are trying to get the reconnect through

try {
dataPort = this.dataPortFuture.get(); // Will wait for the future to complete
Expand Down

0 comments on commit 3f1c822

Please sign in to comment.