diff --git a/src/main/java/net/joshdevins/rabbitmq/client/ha/HaConnectionFactory.java b/src/main/java/net/joshdevins/rabbitmq/client/ha/HaConnectionFactory.java index 79cb835..a5cb163 100644 --- a/src/main/java/net/joshdevins/rabbitmq/client/ha/HaConnectionFactory.java +++ b/src/main/java/net/joshdevins/rabbitmq/client/ha/HaConnectionFactory.java @@ -263,11 +263,10 @@ public void addHaConnectionListener(final HaConnectionListener listener) { * @see ConnectionFactory#newConnection(Address[], int) */ @Override - public Connection newConnection(final Address[] addrs) throws IOException { - + public Connection newConnection(ExecutorService executor, Address[] addrs) { Connection target = null; try { - target = super.newConnection(addrs); + target = super.newConnection(executor, addrs); } catch (IOException ioe) { LOG.warn("Initial connection failed, wrapping anyways and letting reconnector go to work: " @@ -344,7 +343,7 @@ protected ConnectionSet createConnectionProxy(final Address[] addrs, } private Connection newTargetConnection(final Address[] addrs) throws IOException { - return super.newConnection(addrs); + return super.newConnection(null, addrs); } private void setDefaultRetryStrategy() {