TCP/IP forwarding: always resume reading, even in error cases
Follow-up on commit missed a case in the DefaultForwarder.
@@ -1128,6 +1128,7 @@ public class DefaultForwarder
}
session.suspendRead();
ThreadUtils.runAsInternal(() -> channel.getAsyncIn().writeBuffer(buffer).addListener(f -> {
+ session.resumeRead();
Throwable e = f.getException();
if (e != null) {
try {
@@ -1137,12 +1138,9 @@ public class DefaultForwarder
err.getClass().getSimpleName(), e.getClass().getSimpleName(), e.getMessage(), channel,
err.getMessage(), err);
}
- } else {
- if (log.isTraceEnabled()) {
+ } else if (log.isTraceEnabled()) {
log.trace("messageReceived({}) channel={} message={} forwarded", session, channel, totalMessages);
}
- session.resumeRead();
- }
}));
}
