Skip to content

Commit f151c8e

Browse files
Wait for networkRecoveryInterval on any exception
Otherwise we go into an infinite reconnection loop that logs errors.
1 parent 074a696 commit f151c8e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/com/rabbitmq/client/impl/recovery/AutorecoveringConnection.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,9 @@ private void recoverConnection() throws IOException, InterruptedException {
387387
try {
388388
this.delegate = this.cf.newConnection();
389389
recovering = false;
390-
} catch (ConnectException ce) {
390+
} catch (Exception e) {
391391
// TODO: exponential back-off
392392
Thread.sleep(this.params.getNetworkRecoveryInterval());
393-
this.getExceptionHandler().handleConnectionRecoveryException(this, ce);
394-
} catch (Exception e) {
395393
this.getExceptionHandler().handleConnectionRecoveryException(this, e);
396394
}
397395
}

0 commit comments

Comments
 (0)