public void quit() { if (isQuit.compareAndSet(false, true) && !isClosed()) { if (isAuthenticated) { // QS_TODO check write(writeToBuffer(QuitPacket.QUIT, allocate())); write(processor.getBufferPool().allocate()); } else { close(); } } }
@Override public void error(int errCode, Throwable t) { LOGGER.warn(toString(), t); switch (errCode) { case ErrorCode.ERR_HANDLE_DATA: // handle error .. break; case ErrorCode.ERR_PUT_WRITE_QUEUE: // QS_TODO break; default: close(); if (handler instanceof MySQLConnectionHandler) { ((MySQLConnectionHandler) handler).connectionError(t); } } }
public void closeNoActive() { if (isClosed.compareAndSet(false, true)) { close(); } }