Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(619)

Unified Diff: webrtc/api/datachannel.cc

Issue 2472113002: Correct stats for RTCPeerConnectionStats.dataChannels[Opened/Closed]. (Closed)
Patch Set: Addressed deadbeef's comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/datachannel.h ('k') | webrtc/api/datachannel_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/datachannel.cc
diff --git a/webrtc/api/datachannel.cc b/webrtc/api/datachannel.cc
index af694b7b1c4324d504aaf39947f3dd7536e96609..9812e9bb6a68cdddd50087329f0c49a82f9309e9 100644
--- a/webrtc/api/datachannel.cc
+++ b/webrtc/api/datachannel.cc
@@ -480,7 +480,9 @@ void DataChannel::SetState(DataState state) {
if (observer_) {
observer_->OnStateChange();
}
- if (state_ == kClosed) {
+ if (state_ == kOpen) {
+ SignalOpened(this);
+ } else if (state_ == kClosed) {
SignalClosed(this);
}
}
« no previous file with comments | « webrtc/api/datachannel.h ('k') | webrtc/api/datachannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698