From d2bcaa317076c64eb3009f77761dc37777b489dc Mon Sep 17 00:00:00 2001 From: Sean DuBois Date: Tue, 9 Jan 2024 10:46:19 -0500 Subject: [PATCH] Update src/impl/peerconnection.cpp Co-authored-by: Paul-Louis Ageneau --- src/impl/peerconnection.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/impl/peerconnection.cpp b/src/impl/peerconnection.cpp index 05012cdc1..943da6752 100644 --- a/src/impl/peerconnection.cpp +++ b/src/impl/peerconnection.cpp @@ -212,9 +212,8 @@ shared_ptr PeerConnection::initDtlsTransport() { PLOG_VERBOSE << "Starting DTLS transport"; auto fingerprintAlgorithm = CertificateFingerprint::Algorithm::Sha256; - if (auto remote = remoteDescription(); - remote && remote->fingerprint().has_value()) { - fingerprintAlgorithm = remote->fingerprint().value().algorithm; + if (auto remote = remoteDescription(); remote && remote->fingerprint()) { + fingerprintAlgorithm = remote->fingerprint()->algorithm; } auto lower = std::atomic_load(&mIceTransport);