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

Unified Diff: net/socket/tcp_client_socket_pool.cc

Issue 150205: Make ConnectJob::ReleaseSocket() return NULL on connection error. (Closed)
Patch Set: Created 11 years, 6 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
Index: net/socket/tcp_client_socket_pool.cc
diff --git a/net/socket/tcp_client_socket_pool.cc b/net/socket/tcp_client_socket_pool.cc
index a5b5595487a2e0475d394f0908576df6c9442086..6b3fd05377cb14c9b528439fb8b6ebba00a704e7 100644
--- a/net/socket/tcp_client_socket_pool.cc
+++ b/net/socket/tcp_client_socket_pool.cc
@@ -114,6 +114,9 @@ int TCPConnectJob::DoTCPConnectComplete(int result) {
base::TimeDelta::FromMilliseconds(1),
base::TimeDelta::FromMinutes(10),
100);
+ } else {
+ // Delete the socket on error.
+ set_socket(NULL);
}
return result;
« net/socket/client_socket_pool_base.cc ('K') | « net/socket/client_socket_pool_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698