diff --git a/CHANGELOG.md b/CHANGELOG.md index e00f448d65df..4bc624e490d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -172,14 +172,20 @@ #### `dart:io` -- Deprecated `NetworkInterface.listSupported`. Has always returned true since +- Deprecate `NetworkInterface.listSupported`. Has always returned true since Dart 2.3. - Finalize `httpEnableTimelineLogging` parameter name transition from `enable` to `enabled`. See [#43638][]. +- Favor IPv4 connections over IPv6 when connecting sockets. See + [#50868]. - **Breaking change** [#51035][]: - Update `NetworkProfiling` to accommodate new `String` ids that are introduced in vm_service:11.0.0 +[#43638]: https://github.com/dart-lang/sdk/issues/43638 +[#50868]: https://github.com/dart-lang/sdk/issues/50868 +[#51035]: https://github.com/dart-lang/sdk/issues/51035 + #### `dart:js_util` - Added several helper functions to access more JavaScript operator, like diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart index ccea5f5f445a..90387bbccbe7 100644 --- a/sdk/lib/io/socket.dart +++ b/sdk/lib/io/socket.dart @@ -549,9 +549,10 @@ abstract class RawSocket implements Stream { /// /// The [host] can either be a [String] or an [InternetAddress]. If [host] is a /// [String], [connect] will perform a [InternetAddress.lookup] and try - /// all returned [InternetAddress]es, until connected. Unless a - /// connection was established, the error from the first failing connection is - /// returned. + /// all returned [InternetAddress]es, until connected. If IPv4 and IPv6 + /// addresses are both availble then connections over IPv4 are preferred. If + /// no connection can be establed then the error from the first failing + /// connection is returned. /// /// The argument [sourceAddress] can be used to specify the local /// address to bind when making the connection. The [sourceAddress] can either