Shutdown logic checks removed a ciritical check for channel writability
during reschedule. The problem is that an inactive channel is not
writable, hence we need to check for two conditions.
Change-Id: I2c0a79d5f7b8d9cbaec0eaeb553a6f4ecc74f391
Signed-off-by: Robert Varga <rovarga@cisco.com>
* to be writable. May only be called from Netty context.
*/
private void conditionalFlush() {
- if (currentQueue.needsFlush()) {
+ if (currentQueue.needsFlush() && (shutdownOffset != null || parent.getChannel().isWritable())) {
scheduleFlush();
} else {
LOG.trace("Queue is empty, no flush needed");