Skip to content

Commit

Permalink
Use IO::TimeoutError for timed-out select
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Feb 12, 2025
1 parent 464d94c commit 645d68f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/ext/socket/RubyTCPSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private SocketChannel attemptConnect(ThreadContext context, IRubyObject host, St
return channel;
}

throw context.runtime.newErrnoETIMEDOUTError();
throw RubyIOTimeoutError.newIOTimeoutError(context.runtime, Errno.ETIMEDOUT.description()).toThrowable();
} catch (ConnectException e) {
// fall through and try next valid address for the host.
}
Expand Down

0 comments on commit 645d68f

Please sign in to comment.