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

Unified Diff: runtime/bin/http_impl.dart

Issue 10164001: Unregister callbacks from socket, when we return the socket for reuse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated based on gjesse's feedback. Created 8 years, 8 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index 05b1a38b8f105e79425e52d2d345704c36ab6d06..ae9243af27be45418a69f3e261deb8e04e488f22 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -1347,6 +1347,9 @@ class _HttpClient implements HttpClient {
}
void _returnSocketConnection(_SocketConnection socketConn) {
+ // Mark socket as returned to unregister from the old connection.
+ socketConn._markReturned();
+
// If the HTTP client is beeing shutdown don't return the connection.
if (_shutdown) {
socketConn._socket.close();
@@ -1388,7 +1391,6 @@ class _HttpClient implements HttpClient {
// Return connection.
_activeSockets.remove(socketConn);
sockets.addFirst(socketConn);
- socketConn._markReturned();
}
Function _onOpen;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698