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

Issue 2990693002: Fix issues with NetworkMonitor singleton when used by multiple clients. (Closed)

Created:
3 years, 5 months ago by Taylor Brandstetter
Modified:
3 years, 4 months ago
Reviewers:
sakal
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix issues with NetworkMonitor singleton when used by multiple clients. When you create multiple "PeerConnectionFactory"s, they end up using the same NetworkMonitor singleton. But the second one's "AndroidNetworkMonitor" class (in C++) wasn't getting the expected network list update, and as a result it wasn't binding sockets to networks successfully, acting as if the networks didn't exist. The solution is just to move "updateActiveNetworkList" to "startMonitoring". This CL also does some other minor cleanup/refactoring, and fixes a more corner-casey issue where, if the first PeerConnection is destroyed, the second one would stop receiving network updates. BUG=webrtc:7946 Review-Url: https://codereview.webrtc.org/2990693002 Cr-Commit-Position: refs/heads/master@{#19156} Committed: https://chromium.googlesource.com/external/webrtc/+/54c721541d1c29ba3404705e8cb81d3efa7e5db2

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -55 lines) Patch
M webrtc/sdk/android/api/org/webrtc/NetworkMonitor.java View 5 chunks +44 lines, -54 lines 1 comment Download
M webrtc/sdk/android/instrumentationtests/src/org/webrtc/NetworkMonitorTest.java View 2 chunks +5 lines, -1 line 0 comments Download
M webrtc/sdk/android/src/jni/androidnetworkmonitor_jni.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
Taylor Brandstetter
PTAL https://codereview.webrtc.org/2990693002/diff/1/webrtc/sdk/android/api/org/webrtc/NetworkMonitor.java File webrtc/sdk/android/api/org/webrtc/NetworkMonitor.java (left): https://codereview.webrtc.org/2990693002/diff/1/webrtc/sdk/android/api/org/webrtc/NetworkMonitor.java#oldcode83 webrtc/sdk/android/api/org/webrtc/NetworkMonitor.java:83: } This method is only called by tests, ...
3 years, 5 months ago (2017-07-26 02:39:07 UTC) #3
sakal
lgtm
3 years, 4 months ago (2017-07-26 12:47:27 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2990693002/1
3 years, 4 months ago (2017-07-26 18:27:34 UTC) #6
commit-bot: I haz the power
3 years, 4 months ago (2017-07-26 18:56:59 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/external/webrtc/+/54c721541d1c29ba3404705e8...

Powered by Google App Engine
This is Rietveld 408576698