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

Issue 458563002: [NaCl SDK] Fix bug in TCPNode::Connect (Closed)

Created:
6 years, 4 months ago by binji
Modified:
6 years, 4 months ago
Reviewers:
noelallen1
CC:
chromium-reviews, binji+watch_chromium.org, Sam Clegg
Project:
chromium
Visibility:
Public.

Description

[NaCl SDK] Fix bug in TCPNode::Connect Calling connect() would not fail if there was an error connecting. Instead it would return 0 (success) and fail on the first read/write. The fix is to check SocketNode::last_errno_ after the wait succeeds. BUG=none R=noelallen@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288480

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -0 lines) Patch
M native_client_sdk/src/libraries/nacl_io/socket/tcp_node.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M native_client_sdk/src/tests/nacl_io_socket_test/socket_test.cc View 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
binji
6 years, 4 months ago (2014-08-08 19:47:49 UTC) #1
noelallen1
lgtm
6 years, 4 months ago (2014-08-08 20:06:54 UTC) #2
binji
Committed patchset #1 manually as r288480 (presubmit successful).
6 years, 4 months ago (2014-08-09 00:37:50 UTC) #3
manish.baj
6 years, 4 months ago (2014-08-09 19:27:12 UTC) #4
Message was sent while issue was closed.
On 2014/08/09 00:37:50, binji wrote:
> Committed patchset #1 manually as r288480 (presubmit successful).

This needs further work, IMO. Once connect() returns "connection refused", the
client can choose to wait and try connect() again. Say now the server is
listening. So connect should succeed. But in your fix it won't because
SSF_CONNECTING is set. Also, last_errno_ might need to be reset. I tried all
that, and it still didn't work for me. So there is something more that I am
missing.

Powered by Google App Engine
This is Rietveld 408576698