Skip to content

Commit 94774d4

Browse files
TommiWebRTC LUCI CQ
authored andcommitted
Call PrepareShutdown in the dtor just in case Close() hasn't been called
Bug: b/277912909 Change-Id: I0074de59f5d16d500795589a0c94ff4840ffe57a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302384 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39932}
1 parent 70fc5a2 commit 94774d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pc/peer_connection.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,10 @@ PeerConnection::~PeerConnection() {
543543
sdp_handler_->PrepareForShutdown();
544544
}
545545

546+
// In case `Close()` wasn't called, always make sure the controller cancels
547+
// potentially pending operations.
548+
data_channel_controller_.PrepareForShutdown();
549+
546550
// Need to stop transceivers before destroying the stats collector because
547551
// AudioRtpSender has a reference to the LegacyStatsCollector it will update
548552
// when stopping.

0 commit comments

Comments
 (0)