diff options
| author | Misaki Shioi <31817032+shioimm@users.noreply.github.com> | 2025-07-17 18:15:19 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-17 18:15:19 +0900 |
| commit | ba490059b4eb70cb33fbc159e4ee0d12bdd37951 (patch) | |
| tree | 980d116c4e1c0b2453b2f6044b73fa9cad1bce05 /ext/socket/sockssocket.c | |
| parent | 98aa2a6608b026c56130154aa07b1635e05d95e8 (diff) | |
[Feature #21347] Add `open_timeout` as an overall timeout option for `TCPSocket.new` (#13909)
* [Feature #21347] Add `open_timeout` as an overall timeout option for `TCPSocket.new`
With this change, `TCPSocket.new` now accepts the `open_timeout` option.
This option raises an exception if the specified number of seconds has elapsed since the start of the method call,
even if the operation is still in the middle of name resolution or connection attempts.
The addition of this option follows the same intent as the previously merged change to `Socket.tcp`.
[Feature #21347](https://bugs.ruby-lang.org/issues/21347)
https://github.com/ruby/ruby/pull/13368
* Tidy up: Extract rsock_raise_user_specified_timeout()
* Added a note to the documentation of `Socket.tcp`
* Fix `rsock_init_inetsock` for `FAST_FALLBACK_INIT_INETSOCK_IMPL`
Diffstat (limited to 'ext/socket/sockssocket.c')
| -rw-r--r-- | ext/socket/sockssocket.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/sockssocket.c b/ext/socket/sockssocket.c index f033f39b2e..30860ea257 100644 --- a/ext/socket/sockssocket.c +++ b/ext/socket/sockssocket.c @@ -35,7 +35,7 @@ socks_init(VALUE sock, VALUE host, VALUE port) init = 1; } - return rsock_init_inetsock(sock, host, port, Qnil, Qnil, INET_SOCKS, Qnil, Qnil, Qfalse, Qnil); + return rsock_init_inetsock(sock, host, port, Qnil, Qnil, INET_SOCKS, Qnil, Qnil, Qnil, Qfalse, Qnil); } #ifdef SOCKS5 |
