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 838cc55 commit bd38524Copy full SHA for bd38524
src/main/java/com/rabbitmq/client/impl/nio/NioLoop.java
@@ -115,7 +115,14 @@ public void run() {
115
registration = registrationIterator.next();
116
registrationIterator.remove();
117
int operations = registration.operations;
118
- registration.state.getChannel().register(selector, operations, registration.state);
+ try {
119
+ if (registration.state.getChannel().isOpen()) {
120
+ registration.state.getChannel().register(selector, operations, registration.state);
121
+ }
122
+ } catch (Exception e) {
123
+ // can happen if the channel has been closed since the operation has been enqueued
124
+ LOGGER.info("Error while registering socket channel for read: {}", e.getMessage());
125
126
}
127
128
if (select > 0) {
0 commit comments