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

Unified Diff: native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc

Issue 458563002: [NaCl SDK] Fix bug in TCPNode::Connect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « no previous file | native_client_sdk/src/tests/nacl_io_socket_test/socket_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc b/native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc
index df7c8670b812caef41352c6ceec5db9fc6dc2633..de05684a1d81b1ac77d9448a9d6ac23e0f87b07f 100644
--- a/native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc
+++ b/native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc
@@ -480,6 +480,12 @@ Error TcpNode::Connect(const HandleAttr& attr,
return err;
}
+ // Make sure the connection succeeded.
+ if (last_errno_ != 0) {
+ ConnectFailed_Locked();
+ return last_errno_;
+ }
+
ConnectDone_Locked();
return 0;
}
« no previous file with comments | « no previous file | native_client_sdk/src/tests/nacl_io_socket_test/socket_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698