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

Issue 2171183002: Remove ports that are not used by any channel after timeout (Closed)

Created:
4 years, 5 months ago by honghaiz3
Modified:
4 years, 3 months ago
Reviewers:
Zhi Huang, pthatcher1
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com, andresp, juberti
Base URL:
https://chromium.googlesource.com/external/webrtc@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Remove ports that are not used by any channel after timeout If a port is not used by any channel and if it has no connection for 30 seconds, it will be removed. Note, as long as a port is used by a transport channel, it will be kept even if it does not have any connection. This will be beneficial to continual gathering because new connections can be created in the future when network changes. BUG= R=pthatcher@webrtc.org, zhihuang@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/a74363c9982a080b6d35a68b43f2b57d4116532d

Patch Set 1 : . #

Patch Set 2 : fix a comment #

Total comments: 18

Patch Set 3 : . #

Total comments: 16

Patch Set 4 : . #

Total comments: 2

Patch Set 5 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+152 lines, -86 lines) Patch
M webrtc/p2p/base/fakeportallocator.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel.h View 1 2 3 3 chunks +5 lines, -3 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel.cc View 1 2 3 4 chunks +13 lines, -7 lines 0 comments Download
M webrtc/p2p/base/p2ptransportchannel_unittest.cc View 1 2 3 3 chunks +18 lines, -4 lines 0 comments Download
M webrtc/p2p/base/port.h View 1 2 3 4 5 chunks +14 lines, -5 lines 0 comments Download
M webrtc/p2p/base/port.cc View 1 2 3 3 chunks +25 lines, -11 lines 0 comments Download
M webrtc/p2p/base/port_unittest.cc View 1 2 3 5 chunks +58 lines, -53 lines 0 comments Download
M webrtc/p2p/base/portallocator.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M webrtc/p2p/client/basicportallocator.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M webrtc/p2p/client/basicportallocator.cc View 1 2 3 4 chunks +10 lines, -0 lines 0 comments Download
M webrtc/p2p/client/basicportallocator_unittest.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 32 (17 generated)
honghaiz3
4 years, 5 months ago (2016-07-22 18:35:09 UTC) #7
Zhi Huang
On 2016/07/22 18:35:09, honghaiz3 wrote: lgtm
4 years, 5 months ago (2016-07-26 03:18:13 UTC) #8
pthatcher1
https://codereview.webrtc.org/2171183002/diff/80001/webrtc/p2p/base/p2ptransportchannel.cc File webrtc/p2p/base/p2ptransportchannel.cc (right): https://codereview.webrtc.org/2171183002/diff/80001/webrtc/p2p/base/p2ptransportchannel.cc#newcode155 webrtc/p2p/base/p2ptransportchannel.cc:155: } for (PortAllocatorSession session : allocator_sessions_) { session->PruneAllPorts(); } ...
4 years, 4 months ago (2016-07-27 18:33:16 UTC) #9
honghaiz3
PTAL. Now that I am done, I realize that if we do it this way, ...
4 years, 4 months ago (2016-07-28 01:22:49 UTC) #12
honghaiz3
PTAL. Now that I am done, I realize that if we do it this way, ...
4 years, 4 months ago (2016-07-28 01:22:50 UTC) #13
pthatcher1
Mostly style/comment stuff. https://codereview.webrtc.org/2171183002/diff/140001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/2171183002/diff/140001/webrtc/p2p/base/port.cc#newcode649 webrtc/p2p/base/port.cc:649: // If it is pruned, we ...
4 years, 4 months ago (2016-07-28 19:35:06 UTC) #14
honghaiz3
PTAL. Addressed comments. https://codereview.webrtc.org/2171183002/diff/140001/webrtc/p2p/base/port.cc File webrtc/p2p/base/port.cc (right): https://codereview.webrtc.org/2171183002/diff/140001/webrtc/p2p/base/port.cc#newcode649 webrtc/p2p/base/port.cc:649: // If it is pruned, we ...
4 years, 4 months ago (2016-07-28 22:51:45 UTC) #19
honghaiz3
https://codereview.webrtc.org/2171183002/diff/140001/webrtc/p2p/base/port.h File webrtc/p2p/base/port.h (right): https://codereview.webrtc.org/2171183002/diff/140001/webrtc/p2p/base/port.h#newcode159 webrtc/p2p/base/port.h:159: // Called when a port is pruned. On 2016/07/28 ...
4 years, 4 months ago (2016-07-28 22:52:28 UTC) #20
pthatcher1
lgtm https://codereview.webrtc.org/2171183002/diff/220001/webrtc/p2p/base/port.h File webrtc/p2p/base/port.h (right): https://codereview.webrtc.org/2171183002/diff/220001/webrtc/p2p/base/port.h#newcode126 webrtc/p2p/base/port.h:126: // KEEP_ALIVE_UNTIL_RRUNED: A port should not be destroyed ...
4 years, 4 months ago (2016-07-29 00:38:00 UTC) #21
honghaiz3
https://codereview.webrtc.org/2171183002/diff/220001/webrtc/p2p/base/port.h File webrtc/p2p/base/port.h (right): https://codereview.webrtc.org/2171183002/diff/220001/webrtc/p2p/base/port.h#newcode126 webrtc/p2p/base/port.h:126: // KEEP_ALIVE_UNTIL_RRUNED: A port should not be destroyed even ...
4 years, 4 months ago (2016-07-29 00:41:23 UTC) #22
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/2171183002/240001
4 years, 4 months ago (2016-07-29 00:56:25 UTC) #25
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/a74363c9982a080b6d35a68b43f2b57d4116532d Cr-Commit-Position: refs/heads/master@{#13567}
4 years, 4 months ago (2016-07-29 01:06:31 UTC) #28
honghaiz3
Committed patchset #5 (id:240001) manually as a74363c9982a080b6d35a68b43f2b57d4116532d (presubmit successful).
4 years, 4 months ago (2016-07-29 01:06:32 UTC) #29
juberti1
On 2016/07/29 01:06:32, honghaiz3 wrote: > Committed patchset #5 (id:240001) manually as > a74363c9982a080b6d35a68b43f2b57d4116532d (presubmit ...
4 years, 3 months ago (2016-08-26 00:47:32 UTC) #30
honghaiz3
4 years, 3 months ago (2016-08-29 19:08:43 UTC) #32
Message was sent while issue was closed.
On 2016/08/26 00:47:32, juberti1 wrote:
> On 2016/07/29 01:06:32, honghaiz3 wrote:
> > Committed patchset #5 (id:240001) manually as
> > a74363c9982a080b6d35a68b43f2b57d4116532d (presubmit successful).
> 
> Does this only affect ports that had a connection which was was destroyed?
> 
> i.e. if we have created ports and are waiting for a connection from the remote
> side for several minutes (e.g. AppRTC), will that still work?

If we have created ports and are waiting for a connection from the remote side,
it will not be destroyed because it is still being "used" by the transport
channel (i.e., it is not pruned). 

If a port is pruned, even if it had never created connections, it will be
destroyed.

Powered by Google App Engine
This is Rietveld 408576698