From 42d66b894cdfa356ed67af3000f79f7b2e9185fe Mon Sep 17 00:00:00 2001 From: Misaki Shioi <31817032+shioimm@users.noreply.github.com> Date: Fri, 19 Dec 2025 12:12:12 +0900 Subject: Fix: Do not check open_timeout twice (#15626) --- ext/socket/ipsocket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/socket') diff --git a/ext/socket/ipsocket.c b/ext/socket/ipsocket.c index 88225f76e5..c9fcfb64fb 100644 --- a/ext/socket/ipsocket.c +++ b/ext/socket/ipsocket.c @@ -633,7 +633,7 @@ init_fast_fallback_inetsock_internal(VALUE v) unsigned int t; if (!NIL_P(open_timeout)) { t = rsock_value_timeout_to_msec(open_timeout); - } else if (!NIL_P(open_timeout)) { + } else if (!NIL_P(resolv_timeout)) { t = rsock_value_timeout_to_msec(resolv_timeout); } else { t = 0; @@ -1340,7 +1340,7 @@ rsock_init_inetsock( unsigned int t; if (!NIL_P(open_timeout)) { t = rsock_value_timeout_to_msec(open_timeout); - } else if (!NIL_P(open_timeout)) { + } else if (!NIL_P(resolv_timeout)) { t = rsock_value_timeout_to_msec(resolv_timeout); } else { t = 0; -- cgit v1.2.3