Drop the DataChannel message if it's received when the channel is not open.
It may happen when the JS has closed the channel on the signaling thread while messages are received on the worker thread and posted before the state change is pushed to the worker thread. BUG=crbug/363005 R=mallinath@webrtc.org Review URL: https://webrtc-codereview.appspot.com/19469005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6161 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -284,6 +284,10 @@ void DataChannel::OnDataEngineClose() {
|
||||
void DataChannel::OnDataReceived(cricket::DataChannel* channel,
|
||||
const cricket::ReceiveDataParams& params,
|
||||
const talk_base::Buffer& payload) {
|
||||
if (state_ != kOpen) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 expected_ssrc =
|
||||
(data_channel_type_ == cricket::DCT_RTP) ? receive_ssrc_ : config_.id;
|
||||
if (params.ssrc != expected_ssrc) {
|
||||
|
Reference in New Issue
Block a user