ruby/ext
Misaki Shioi 1683dadb19
Do not save ResolutionError if resolution succeeds for any address family (#12678)
* Do not save ResolutionError if resolution succeeds for any address family

Socket with Happy Eyeballs Version 2 performs connection attempts and name resolution in parallel.

In the existing implementation, if a connection attempt failed for one address family while name resolution was still in progress for the other, and that name resolution later failed, the method would terminate with a name resolution error.
This behavior was intended to ensure that the final error reflected the most recent failure, potentially overriding an earlier error.

However, [Bug #21088](https://bugs.ruby-lang.org/issues/21088) made me realize that terminating with a name resolution error is unnatural when name resolution succeeded for at least one address family.

This PR modifies the behavior so that if name resolution succeeds for one address family, any name resolution error from the other is not saved.

This PR includes the following changes:

* Do not display select(2) as the system call that caused the raised error, as it is for internal processing

* Fix bug: Get errno with Socket::SO_ERROR in Windows environment with a workaround for tests not passing
2025-02-03 20:26:47 +09:00
..
-test- Dependency: ext/-test-/memory_status/depend 2025-01-13 11:41:44 +09:00
cgi/escape ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
continuation ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
coverage Prefix asan_poison_object with rb 2024-12-19 09:14:34 -05:00
date [ruby/date] Enclose dangling else in braces and fix -Wmisleading-indentation 2025-01-13 03:12:28 +00:00
digest [ruby/digest] Bump up v3.2.0 2024-12-16 03:31:55 +00:00
erb/escape [ruby/erb] Skip building a native extension for JRuby 2024-01-04 22:33:16 +00:00
etc [ruby/etc] Bump up 1.4.5 2024-12-09 14:06:05 +09:00
fcntl [ruby/fcntl] Fixup gemspec files 2024-11-07 18:45:05 +09:00
fiddle [ruby/fiddle] Fix Fiddle.last_error on FFI backend and improve test 2025-02-03 10:22:16 +09:00
io [ruby/io-console] Bump up 0.8.0 2024-12-03 05:05:14 +00:00
json [ruby/json] Refactor further to expose the simpler escape search possible 2025-02-03 10:05:26 +09:00
monitor [DOC] Monitor 2024-12-25 13:16:14 +09:00
objspace Output object_id in ObjectSpace.dump 2025-01-30 11:48:14 -05:00
openssl [ruby/openssl] pkey/ec: remove deprecated PKey::EC::Point#mul(ary, ary [, bn]) form 2025-02-03 09:47:48 +00:00
pathname [ruby/pathname] Bump up v0.4.0 2024-11-06 07:09:08 +00:00
psych [ruby/psych] Bump version for release 2025-01-17 15:15:39 +00:00
pty Remove a useless check if fd is negative 2024-11-29 12:38:20 +09:00
rbconfig/sizeof ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
ripper Use LRAMA instead of BISON 2025-01-14 17:20:02 +09:00
rubyvm Added depend files 2019-07-14 01:31:29 +09:00
socket Do not save ResolutionError if resolution succeeds for any address family (#12678) 2025-02-03 20:26:47 +09:00
stringio [ruby/stringio] Provide a 'Changelog' link on 2025-01-02 23:21:31 +00:00
strscan [ruby/strscan] [DOC] Add syntax highlighting to MarkDown code blocks 2024-12-16 10:10:34 +09:00
win32 [ruby/resolv] w32error_raise never returns 2025-01-30 05:18:31 +00:00
zlib [ruby/zlib] Bump up v3.2.1 2024-12-13 00:33:58 +00:00
.document [ruby/io-console] [DOC] Split .document files to sync with ruby/ruby 2023-10-22 11:09:06 +09:00
extmk.rb [Bug #21092] Fallback variables after execonf has done 2025-01-30 14:52:01 +09:00
Setup Clean up removed directories in ext/Setup* [ci skip] 2023-01-18 12:02:27 +09:00
Setup.atheos racc/cparse is extracted from ruby/ruby repository 2023-06-08 18:05:07 +09:00
Setup.nt racc/cparse is extracted from ruby/ruby repository 2023-06-08 18:05:07 +09:00