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

Unified Diff: net/socket/tcp_client_socket_libevent.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_libevent.cc
diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc
index 2f7e4b4b2558d4279be4c7f967485c987da401ed..a8c2eb97e4aac0394ee0712bf8701f7afa135396 100644
--- a/net/socket/tcp_client_socket_libevent.cc
+++ b/net/socket/tcp_client_socket_libevent.cc
@@ -162,8 +162,11 @@ int TCPClientSocketLibevent::AdoptSocket(int socket) {
DCHECK_EQ(socket_, kInvalidSocket);
int error = SetupSocket(socket);
- if (error)
+ if (error) {
+ if (HANDLE_EINTR(close(socket)) < 0)
akalin 2013/08/26 18:53:21 may be worth splitting off this into its own chang
yzshen1 2013/08/26 23:09:57 Done.
akalin 2013/08/26 23:29:15 Do you have a link to the new change? Or were you
+ PLOG(ERROR) << "close";
return MapSystemError(error);
+ }
socket_ = socket;

Powered by Google App Engine
This is Rietveld 408576698