/** Recycle the output buffer. This should be called when closing the connection. */ @Override public void recycle() { super.recycle(); if (socket != null) { socket.getBufHandler().getWriteBuffer().clear(); socket = null; } lastWrite.set(1); }