Skip to content

Commit 42d66b8

Browse files
authored
Fix: Do not check open_timeout twice (ruby#15626)
1 parent 305f042 commit 42d66b8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ext/socket/ipsocket.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ init_fast_fallback_inetsock_internal(VALUE v)
633633
unsigned int t;
634634
if (!NIL_P(open_timeout)) {
635635
t = rsock_value_timeout_to_msec(open_timeout);
636-
} else if (!NIL_P(open_timeout)) {
636+
} else if (!NIL_P(resolv_timeout)) {
637637
t = rsock_value_timeout_to_msec(resolv_timeout);
638638
} else {
639639
t = 0;
@@ -1340,7 +1340,7 @@ rsock_init_inetsock(
13401340
unsigned int t;
13411341
if (!NIL_P(open_timeout)) {
13421342
t = rsock_value_timeout_to_msec(open_timeout);
1343-
} else if (!NIL_P(open_timeout)) {
1343+
} else if (!NIL_P(resolv_timeout)) {
13441344
t = rsock_value_timeout_to_msec(resolv_timeout);
13451345
} else {
13461346
t = 0;

0 commit comments

Comments
 (0)