From d9ff8b3e86a03499a5c6bc36fae1592914a25b9c Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Thu, 1 Jul 2021 12:08:20 -0700 Subject: Ignore timeout option to Addrinfo.getaddrinfo This was already ignored on platforms that do not implement getaddrinfo_a. Using getaddrinfo_a causes issues with many calls to Addrinfo.getaddrinfo and also when using Addrinfo.getaddrinfo with fork. I would have updated the documentation for this, but the option was already not documented. --- ext/socket/raddrinfo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 9ec2fdc329..c4de1b09e1 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -2496,9 +2496,7 @@ addrinfo_s_getaddrinfo(int argc, VALUE *argv, VALUE self) rb_scan_args(argc, argv, "24:", &node, &service, &family, &socktype, &protocol, &flags, &opts); rb_get_kwargs(opts, &id_timeout, 0, 1, &timeout); - if (timeout == Qundef) { - timeout = Qnil; - } + timeout = Qnil; return addrinfo_list_new(node, service, family, socktype, protocol, flags, timeout); } -- cgit v1.2.3