Skip to content

Commit 2dcb249

Browse files
committed
Propagate exception in no-op in ErrorOnWriteListener
[#154263515] References #341
1 parent f83946c commit 2dcb249

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/com/rabbitmq/client/impl/AMQConnection.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,10 @@ public AMQConnection(ConnectionParams params, FrameHandler frameHandler, Metrics
254254
this.errorOnWriteListener = params.getErrorOnWriteListener() != null ? params.getErrorOnWriteListener() :
255255
new ErrorOnWriteListener() {
256256
@Override
257-
public void handle(Connection connection, IOException exception) { }
257+
public void handle(Connection connection, IOException exception) throws IOException {
258+
// we just propagate the exception for non-recoverable connections
259+
throw exception;
260+
}
258261
};
259262
this.workPoolTimeout = params.getWorkPoolTimeout();
260263
}

0 commit comments

Comments
 (0)