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

Issue 436493002: Handle multiple simultanous wss: connections. (Closed)

Created:
6 years, 4 months ago by Adam Rice
Modified:
6 years, 4 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Handle multiple simultanous wss: connections. Previously, multiple simultaneous wss: connections to the same endpoint did not work because the endpoint lock was not correctly released at the end of the handshake. This happened because the socket was wrapped for SSL and so the original socket address that was passed to RememberSocket() was not the same one passed to UnlockSocket(). Make releasing of the lock on successful handshake happen using the address provided by GetPeerAddress() instead of the RememberSocket() mechanism. This will not work if the socket has already been closed; however, in that case the socket should be rapidly returned to the pool anyway at which point UnlockSocket() will be called as normal. Also add a browser test for multiple simultaneous wss: connections (WebSocketBrowserTest.SSLConnectionLimit). BUG=398737 TEST=net_unittests, browser_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287550

Patch Set 1 #

Patch Set 2 : Prevent a single socket from unlocking multiple endpoints. #

Patch Set 3 : Two tiny comment fixes. #

Total comments: 4

Patch Set 4 : Use a pointer instead of a reference to scoped_ptr. #

Total comments: 1

Patch Set 5 : s/interator/iterator/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -60 lines) Patch
M chrome/browser/net/websocket_browsertest.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M net/data/websocket/README View 1 chunk +3 lines, -0 lines 0 comments Download
A net/data/websocket/multiple-connections.html View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
M net/socket/websocket_endpoint_lock_manager.h View 1 2 3 4 1 chunk +54 lines, -18 lines 0 comments Download
M net/socket/websocket_endpoint_lock_manager.cc View 1 2 3 1 chunk +74 lines, -37 lines 0 comments Download
M net/socket/websocket_endpoint_lock_manager_unittest.cc View 1 1 chunk +23 lines, -4 lines 0 comments Download
M net/socket/websocket_transport_client_socket_pool.h View 1 chunk +3 lines, -0 lines 0 comments Download
M net/socket/websocket_transport_client_socket_pool.cc View 1 chunk +4 lines, -1 line 0 comments Download
M net/socket/websocket_transport_client_socket_pool_unittest.cc View 1 2 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Adam Rice
6 years, 4 months ago (2014-08-01 09:32:55 UTC) #1
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/436493002/diff/40001/net/socket/websocket_endpoint_lock_manager.cc File net/socket/websocket_endpoint_lock_manager.cc (right): https://codereview.chromium.org/436493002/diff/40001/net/socket/websocket_endpoint_lock_manager.cc#newcode105 net/socket/websocket_endpoint_lock_manager.cc:105: scoped_ptr<LockInfo::WaiterQueue>& queue = lock_info_it->second.queue; how about just using ...
6 years, 4 months ago (2014-08-01 11:31:44 UTC) #2
Adam Rice
https://codereview.chromium.org/436493002/diff/40001/net/socket/websocket_endpoint_lock_manager.cc File net/socket/websocket_endpoint_lock_manager.cc (right): https://codereview.chromium.org/436493002/diff/40001/net/socket/websocket_endpoint_lock_manager.cc#newcode105 net/socket/websocket_endpoint_lock_manager.cc:105: scoped_ptr<LockInfo::WaiterQueue>& queue = lock_info_it->second.queue; On 2014/08/01 11:31:44, tyoshino wrote: ...
6 years, 4 months ago (2014-08-01 14:09:39 UTC) #3
Adam Rice
+jgraettinger for net/ OWNERS.
6 years, 4 months ago (2014-08-01 14:10:17 UTC) #4
tyoshino (SeeGerritForStatus)
ps4 lgtm
6 years, 4 months ago (2014-08-04 04:27:13 UTC) #5
Johnny
+mmenke for chrome/browser/net net/ lgtm https://codereview.chromium.org/436493002/diff/60001/net/socket/websocket_endpoint_lock_manager.h File net/socket/websocket_endpoint_lock_manager.h (right): https://codereview.chromium.org/436493002/diff/60001/net/socket/websocket_endpoint_lock_manager.h#newcode91 net/socket/websocket_endpoint_lock_manager.h:91: // SocketLockInfoMap requires std::map ...
6 years, 4 months ago (2014-08-04 21:23:58 UTC) #6
mmenke
LGTM
6 years, 4 months ago (2014-08-04 21:26:39 UTC) #7
Adam Rice
The CQ bit was checked by ricea@chromium.org
6 years, 4 months ago (2014-08-05 10:33:46 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ricea@chromium.org/436493002/80001
6 years, 4 months ago (2014-08-05 10:34:26 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-08-05 16:31:28 UTC) #10
Message was sent while issue was closed.
Change committed as 287550

Powered by Google App Engine
This is Rietveld 408576698