mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 20:01:50 +00:00
Bug 1907806: Clear mPending out before closing channels. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D216736
This commit is contained in:
parent
533bc1ce3e
commit
fffcd94c55
@ -3018,13 +3018,13 @@ void DataChannelConnection::CloseAll() {
|
||||
}
|
||||
|
||||
// Clean up any pending opens for channels
|
||||
for (const auto& channel : mPending) {
|
||||
std::set<RefPtr<DataChannel>> temp(std::move(mPending));
|
||||
for (const auto& channel : temp) {
|
||||
DC_DEBUG(("closing pending channel %p, stream %u", channel.get(),
|
||||
channel->mStream));
|
||||
MutexAutoUnlock lock(mLock);
|
||||
channel->Close(); // also releases the ref on each iteration
|
||||
}
|
||||
mPending.clear();
|
||||
// It's more efficient to let the Resets queue in shutdown and then
|
||||
// SendOutgoingStreamReset() here.
|
||||
SendOutgoingStreamReset();
|
||||
|
Loading…
x
Reference in New Issue
Block a user