Bug 1118398 - Dispatch data channel onclose unconditionally on reset, r=jesup

--HG--
extra : rebase_source : d1046d4daf3afc1c2e56962e485f321f9c73806f
This commit is contained in:
Martin Thomson 2015-01-21 14:34:13 -08:00
Родитель c9ef92b837
Коммит 8966c2b84a
1 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -1766,12 +1766,12 @@ DataChannelConnection::HandleStreamResetEvent(const struct sctp_stream_reset_eve
channel->mState == DataChannel::WAITING_TO_OPEN);
if (channel->mState == DataChannel::OPEN ||
channel->mState == DataChannel::WAITING_TO_OPEN) {
// Mark the stream for reset (the reset is sent below)
ResetOutgoingStream(channel->mStream);
SendOutgoingStreamReset();
NS_DispatchToMainThread(new DataChannelOnMessageAvailable(
DataChannelOnMessageAvailable::ON_CHANNEL_CLOSED, this,
channel));
}
NS_DispatchToMainThread(new DataChannelOnMessageAvailable(
DataChannelOnMessageAvailable::ON_CHANNEL_CLOSED, this,
channel));
mStreams[channel->mStream] = nullptr;
LOG(("Disconnected DataChannel %p from connection %p",
@ -1785,7 +1785,7 @@ DataChannelConnection::HandleStreamResetEvent(const struct sctp_stream_reset_eve
}
}
// In case we failed to send a RESET due to having one outstanding, process any pending resets now:
// Process any pending resets now:
if (!mStreamsResetting.IsEmpty()) {
LOG(("Sending %d pending resets", mStreamsResetting.Length()));
SendOutgoingStreamReset();