Commit 5c10a785 authored by Harald Alvestrand's avatar Harald Alvestrand Committed by Commit Bot

Allow DTLSTransport state change from "closed" to "closed"

In certain cases involving stopped transceivers, a sender or
receiver can be created with an already closed DTLSTransport,
which will cause the state to be set to "closed" even when it
is already closed.
Allow this case.

Bug: webrtc:11840
Change-Id: I21aad316f5cf74a6b4bf18ac87fcf460afc74531
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424260Reviewed-by: default avatarHenrik Boström <hbos@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809770}
parent ec071aee
......@@ -94,7 +94,8 @@ webrtc::DtlsTransportInterface* RTCDtlsTransport::native_transport() {
}
void RTCDtlsTransport::ChangeState(webrtc::DtlsTransportInformation info) {
DCHECK(current_state_.state() != webrtc::DtlsTransportState::kClosed);
DCHECK(info.state() == webrtc::DtlsTransportState::kClosed ||
current_state_.state() != webrtc::DtlsTransportState::kClosed);
current_state_ = info;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment