summaryrefslogtreecommitdiff
path: root/ext/socket/tcpsocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/tcpsocket.c')
-rw-r--r--ext/socket/tcpsocket.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/socket/tcpsocket.c b/ext/socket/tcpsocket.c
index 10b4810869..3c03e89e0d 100644
--- a/ext/socket/tcpsocket.c
+++ b/ext/socket/tcpsocket.c
@@ -20,14 +20,17 @@
*
* Starting from Ruby 3.4, this method operates according to the
* Happy Eyeballs Version 2 ({RFC 8305}[https://datatracker.ietf.org/doc/html/rfc8305])
- * algorithm with *fast_fallback:true+, except on Windows.
+ * algorithm by default, except on Windows.
+ *
+ * To make it behave the same as in Ruby 3.3 and earlier,
+ * explicitly specify the option +fast_fallback:false+.
*
* Happy Eyeballs Version 2 is not provided on Windows,
* and it behaves the same as in Ruby 3.3 and earlier.
*
* [:resolv_timeout] Specifies the timeout in seconds from when the hostname resolution starts.
* [:connect_timeout] This method sequentially attempts connecting to all candidate destination addresses.<br>The +connect_timeout+ specifies the timeout in seconds from the start of the connection attempt to the last candidate.<br>By default, all connection attempts continue until the timeout occurs.<br>When +fast_fallback:false+ is explicitly specified,<br>a timeout is set for each connection attempt and any connection attempt that exceeds its timeout will be canceled.
- * [:fast_fallback] Enables the Happy Eyeballs Version 2 algorithm (disabled by default).
+ * [:fast_fallback] Enables the Happy Eyeballs Version 2 algorithm (enabled by default).
*
* === Happy Eyeballs Version 2
* Happy Eyeballs Version 2 ({RFC 8305}[https://datatracker.ietf.org/doc/html/rfc8305])
@@ -57,7 +60,7 @@ tcp_init(int argc, VALUE *argv, VALUE sock)
VALUE kwargs[4];
VALUE resolv_timeout = Qnil;
VALUE connect_timeout = Qnil;
- VALUE fast_fallback = Qfalse;
+ VALUE fast_fallback = Qtrue;
VALUE test_mode_settings = Qnil;
if (!keyword_ids[0]) {