Skip to content

Add connect_timeout to TCPSocket - #3585

Open
mmasaki wants to merge 1 commit into
ruby:masterfrom
mmasaki:tcpsocket_connect_timeout
Open

Add connect_timeout to TCPSocket#3585
mmasaki wants to merge 1 commit into
ruby:masterfrom
mmasaki:tcpsocket_connect_timeout

Conversation

@mmasaki

@mmasaki mmasaki commented Sep 25, 2020

Copy link
Copy Markdown
Member

Add connect_timeout to TCPSocket.new in the same way as Socket.tcp.
https://bugs.ruby-lang.org/issues/17187

TCPSocket.new("192.0.2.1", 1234, connect_timeout: 1) #=> raise Errno::ETIMEDOUT

@ioquatix

ioquatix commented Oct 1, 2020

Copy link
Copy Markdown
Member

This looks good to me.

Do you know when resolv_timeout was added? Because it seems like it should be resolve_timeout.

@mmasaki

mmasaki commented Oct 1, 2020

Copy link
Copy Markdown
Member Author

resolv_timeout was merged in 511fe23.
I intended to make it consistent with Socket.tcp (it accepts resolv_timeout).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants