@Override
	public void close() throws IOException {
		if (connection == null) return;
		active = false;
    	try {
    		RedisResult result = handler.request(new ProtoBuilder().array(Protocol.Command.QUIT).build(), timeout);
    		if (result == null) {
    			throw new RedisTimeoutException();
    		}
    		if (result.getException() != null) {
				throw result.getException();
			}
    		connector.close();
		} catch (Throwable e) {
			if (LOGGER.isDebugEnabled()) {
				LOGGER.debug("[Redis][Ping][ping failed with:" + e.getMessage() + "]", e);
			}
			connector.close();
		}
	}