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

Issue 259353003: Make Socket::connect try all addresses given. (Closed)

Created:
6 years, 7 months ago by Anders Johnsen
Modified:
6 years, 7 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Make Socket::connect try all addresses given. BUG= R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=35619

Patch Set 1 #

Total comments: 11

Patch Set 2 : review. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -30 lines) Patch
M runtime/bin/socket_patch.dart View 1 1 chunk +37 lines, -26 lines 4 comments Download
M sdk/lib/io/socket.dart View 1 2 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Anders Johnsen
6 years, 7 months ago (2014-04-30 10:48:07 UTC) #1
Søren Gjesse
https://codereview.chromium.org/259353003/diff/1/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/259353003/diff/1/runtime/bin/socket_patch.dart#newcode485 runtime/bin/socket_patch.dart:485: if (host is List) { We don't want to ...
6 years, 7 months ago (2014-04-30 13:11:55 UTC) #2
Ivan Posva
DBC -ip https://codereview.chromium.org/259353003/diff/1/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/259353003/diff/1/runtime/bin/socket_patch.dart#newcode510 runtime/bin/socket_patch.dart:510: completer.completeError(error); On 2014/04/30 13:11:56, Søren Gjesse wrote: ...
6 years, 7 months ago (2014-04-30 16:28:06 UTC) #3
Anders Johnsen
PTAL https://codereview.chromium.org/259353003/diff/1/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/259353003/diff/1/runtime/bin/socket_patch.dart#newcode485 runtime/bin/socket_patch.dart:485: if (host is List) { On 2014/04/30 13:11:56, ...
6 years, 7 months ago (2014-05-01 06:31:22 UTC) #4
Søren Gjesse
lgtm https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch.dart#newcode520 runtime/bin/socket_patch.dart:520: socket.close(); Add a comment that this keeps the ...
6 years, 7 months ago (2014-05-01 07:23:34 UTC) #5
Anders Johnsen
https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch.dart#newcode520 runtime/bin/socket_patch.dart:520: socket.close(); On 2014/05/01 07:23:34, Søren Gjesse wrote: > Add ...
6 years, 7 months ago (2014-05-01 08:42:38 UTC) #6
Anders Johnsen
Committed patchset #2 manually as r35619 (presubmit successful).
6 years, 7 months ago (2014-05-01 08:43:04 UTC) #7
codefu
https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch.dart#newcode521 runtime/bin/socket_patch.dart:521: run(error != null ? error : e); If addresses.length ...
6 years, 7 months ago (2014-05-01 18:52:02 UTC) #8
Anders Johnsen
6 years, 7 months ago (2014-05-01 19:27:58 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch...
File runtime/bin/socket_patch.dart (right):

https://codereview.chromium.org/259353003/diff/20001/runtime/bin/socket_patch...
runtime/bin/socket_patch.dart:521: run(error != null ? error : e);
On 2014/05/01 18:52:02, codefu wrote:
> If addresses.length > 1 and the first address connects... if later in time the
> socket has an error won't this try to reconnect on later addresses (and
possibly
> throw an error since completer is already done)?
> 
> suggested: bool retry = true; before run(), then retry = false just before
> comleter.complete(socket).  in error if(retry) run(...);

No, this error handler is only called when connecting fails. As soon as the
connection is made, we disable listening (see above) and later register another
error handler.

Powered by Google App Engine
This is Rietveld 408576698