private void removeSession(HostAndPort key, NativeSslSession session) {
        synchronized (sessionsByHostAndPort) {
            List<NativeSslSession> sessions = sessionsByHostAndPort.get(key);
            if (sessions != null) {
                sessions.remove(session);
                if (sessions.isEmpty()) {
                    sessionsByHostAndPort.remove(key);
                }
            }
        }
    }
Finds a cached session for the given host name and port.

@param host of server
@param port of server
@return cached session or null if none found
common/src/main/java/org/conscrypt/ClientSessionContext.java