We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2878464 commit 0d25127Copy full SHA for 0d25127
src/main/java/com/rabbitmq/client/impl/nio/NioLoop.java
@@ -118,7 +118,14 @@ public void run() {
118
registration = registrationIterator.next();
119
registrationIterator.remove();
120
int operations = registration.operations;
121
- registration.state.getChannel().register(selector, operations, registration.state);
+ try {
122
+ if (registration.state.getChannel().isOpen()) {
123
+ registration.state.getChannel().register(selector, operations, registration.state);
124
+ }
125
+ } catch (Exception e) {
126
+ // can happen if the channel has been closed since the operation has been enqueued
127
+ LOGGER.info("Error while registering socket channel for read: {}", e.getMessage());
128
129
}
130
131
if (select > 0) {
0 commit comments