@Override
    public void remove(Connection connection) {
        if (null == connection) {
            return;
        }
        Set<String> poolKeys = connection.getPoolKeys();
        if (null == poolKeys || poolKeys.isEmpty()) {
            connection.close();
            logger.warn("Remove and close a standalone connection.");
        } else {
            for (String poolKey : poolKeys) {
                this.remove(connection, poolKey);
            }
        }
    }
@see com.alipay.remoting.ConnectionManager#remove(com.alipay.remoting.Connection)
src/main/java/com/alipay/remoting/DefaultConnectionManager.java