@Override
    public void removeHandshakeCompletedListener(HandshakeCompletedListener listener) {
        checkArgument(listener != null, "Provided listener is null");
        if (!listeners.remove(listener)) {
            throw new IllegalArgumentException("Provided listener is not registered");
        }
    }
Try to extract the peer's hostname if it's available from the endpoint address.
common/src/main/java/org/conscrypt/AbstractConscryptSocket.java