[ruby-core:95701] [Ruby master Feature#14430] net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout
From:
jean.boussier@...
Date:
2019-11-05 13:32:48 UTC
List:
ruby-core #95701
Issue #14430 has been updated by byroot (Jean Boussier). We've been recently bitten by this. Does the merge of [#15553] makes https://github.com/ruby/ruby/pull/1806 fun= ctional? ---------------------------------------- Feature #14430: net/http: use Socket.tcp with connect_timeout, instead of T= CPSocket.open wrapped in Timeout.timeout https://bugs.ruby-lang.org/issues/14430#change-82488 * Author: carl.hoerberg (Carl H=F6rberg) * Status: Open * Priority: Normal * Assignee: = * Target version: = ---------------------------------------- Instead of using TCPSocket.open, wrapped in Timeout.timeout, that will crea= te a temporary thread. By using Socket.tcp with the connect_timeout argumen= t for open_timeout the connection opening is much more efficient as the ker= nels timeout is used instead. = PR at: https://github.com/ruby/ruby/pull/1806 -- = https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=3Dunsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>