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

Unified Diff: net/socket/tcp_client_socket_win.cc

Issue 22861033: Move server socket functionality from TCPServerSocket into TCPSocket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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_win.cc
diff --git a/net/socket/tcp_client_socket_win.cc b/net/socket/tcp_client_socket_win.cc
index 9b0a5b50bf1a25002e6dab233f1abb76d021b693..71a054c953198d6445e67ca06930a905ff25b947 100644
--- a/net/socket/tcp_client_socket_win.cc
+++ b/net/socket/tcp_client_socket_win.cc
@@ -357,8 +357,11 @@ int TCPClientSocketWin::AdoptSocket(SOCKET socket) {
DCHECK_EQ(socket_, INVALID_SOCKET);
int error = SetupSocket(socket);
- if (error)
+ if (error) {
+ if (closesocket(socket) < 0)
+ PLOG(ERROR) << "closesocket";
return MapSystemError(error);
+ }
socket_ = socket;
SetNonBlocking(socket_);

Powered by Google App Engine
This is Rietveld 408576698