Fix the timeout of getaddrinfo with a nil host or service

Building the error message from a NULL pointer raised ArgumentError instead of IO::TimeoutError.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hiroshi SHIBATAandClaude Opus 5.5 committed 2026-10-28 08:42:54 +09:00
1 parent 47d566434f
commit 021446fa21
1 file changed
+2 -2
Notes: git 2026-10-27 23:43:29 +00:00
+2 -2
View File
@@ -651,8 +651,8 @@ start:
if (need_free) free_getaddrinfo_arg(arg);
if (timedout) {
VALUE host = rb_str_new_cstr(hostp);
VALUE port = rb_str_new_cstr(portp);
VALUE host = hostp ? rb_str_new_cstr(hostp) : Qnil;
VALUE port = portp ? rb_str_new_cstr(portp) : Qnil;
rsock_raise_user_specified_timeout(NULL, host, port);
}