Fix: Do not check open_timeout twice (#15626)

This commit is contained in:
Misaki Shioi 2025-12-19 12:12:12 +09:00 committed by GitHub
parent 305f042105
commit 42d66b894c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-12-19 03:12:39 +00:00
Merged-By: shioimm <shioi.mm@gmail.com>

View File

@ -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;