Fix netty bug with flush on write