WriteRequest req;
if ((req = writeRequestQueue.poll()) != null) {
ByteBuffer buf = (ByteBuffer) req.getMessage();
try {
buf.release();
} catch (IllegalStateException e) {
session.getFilterChain().fireExceptionCaught(session, e);
} finally {
// The first unwritten empty buffer must be
// forwarded to the filter chain.