https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112019-01-21T06:36:06ZRuby Issue Tracking SystemRuby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=764332019-01-21T06:36:06ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/14430">Feature #14430</a>: net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout</i> added</li></ul> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=764462019-01-21T08:58:36Zahorek (Pavel Rosický)
<ul></ul><p>thanks for this PR. Many requests for fully async support in stdlib are blocked by this.</p>
<p>I think on Windows 8+ we can use <a href="https://docs.microsoft.com/cs-cz/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfoexa" class="external">https://docs.microsoft.com/cs-cz/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfoexa</a> to avoid timeout?</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=764762019-01-23T14:13:20Znaruse (Yui NARUSE)naruse@airemix.jp
<ul></ul><p>Why hrtime.h is included?</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=764812019-01-23T21:47:29ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul></ul><blockquote>
<p>Why hrtime.h is included?</p>
</blockquote>
<p>It's unnecessary. I'll remove it.</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=766802019-02-06T09:22:46Zakr (Akira Tanaka)akr@fsij.org
<ul></ul><p>I'm positive to use getaddrinfo_a if it is available.</p>
<p>However, if getaddrinfo_a is not available and timeout option is not set,<br>
timeout library should not be loaded.</p>
<p>Also, it's welcome to improve resolv.rb.</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=766852019-02-06T12:44:51Zakr (Akira Tanaka)akr@fsij.org
<ul></ul><p>I think timeout library is not effective for getaddrinfo method (without getaddrinfo_a).</p>
<p>What the patch tries to change on a platform which has no getaddrinfo_a?</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=766992019-02-06T19:08:43ZEregon (Benoit Daloze)
<ul></ul><p>akr (Akira Tanaka) wrote:</p>
<blockquote>
<p>I think timeout library is not effective for getaddrinfo method (without getaddrinfo_a).</p>
</blockquote>
<p>That was also my experience trying to use SIGVTALRM to interrupt getaddrinfo(3): it had no effect, the code ignores EINTR and only ends after 5 seconds (its default timeout I guess).</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=772962019-03-24T05:39:34ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/7727">patch2.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/7727/patch2.diff">patch2.diff</a> added</li></ul><p>I updated the patch.</p>
<ul>
<li>get rid of Timeout from ext/socket/lib/socket.rb. If getaddrinfo_a() is not available, timeout is ignored.</li>
</ul> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=774522019-04-03T10:40:07Zmaciej.mensfeld (Maciej Mensfeld)maciej@mensfeld.pl
<ul></ul><p>This is also related to it: <a href="https://bugs.ruby-lang.org/issues/14997" class="external">https://bugs.ruby-lang.org/issues/14997</a> - once the DNS timeout is in place (when available) I could give the <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Socket connect timeout exceeds the timeout value for (Closed)" href="https://redmine.ruby-lang.org/issues/14997">#14997</a> a shot adding per ip timeout and including the resolving timeout in the overall timeout.</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=802312019-07-30T03:35:11ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/14997">Bug #14997</a>: Socket connect timeout exceeds the timeout value for </i> added</li></ul> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=812822019-08-30T03:23:27Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul></ul><p>Reviewed the patch and found no issues. So LGTM.</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=812872019-08-30T08:07:40ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul></ul><p>Thank you for reviewing. I will commit it.</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=814772019-09-09T06:39:30ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li><li><strong>Assignee</strong> set to <i>Glass_saga (Masaki Matsushita)</i></li></ul><p>committed in 6382f5cc91ac9e36776bc854632d9a1237250da7</p> Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeouthttps://redmine.ruby-lang.org/issues/15553?journal_id=872342020-08-27T16:17:28ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-4 priority-default" href="/issues/16381">Feature #16381</a>: Accept resolv_timeout in Net::HTTP</i> added</li></ul>