git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Fix potential hang in https handshake.

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 19, 2012, 17:02 UTC
Message-ID
<7vpq4ejsxz.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAHOQ7J9W8FdKqzqbuDqj4bcFyN02kUigWtbL_xCen-PYWF9LUg@mail.gmail.com>
Stefan Zager <szager@google.com> writes:
Show 12 quoted lines
> On Oct 19, 2012 7:11 AM, "Shawn Pearce" <spearce@spearce.org> wrote:
>>
>> The issue with the current code is sometimes when libcurl is opening a
>> CONNECT style connection through an HTTP proxy it returns a crazy high
>> timeout (>240 seconds) and no fds. In this case Git waits forever.
>> Stefan observed that using a timeout of 50 ms in this situation to
>> poll libcurl is better, as it figures out a lot more quickly that it
>> is connected to the proxy and can issue the request.
>
> Correct.  Anecdotally, the zero-file-descriptor situation happens only once
> per process invocation, so the risk of passing a too-long timeout to
> select() is small.
Thanks.
Previous: Junio C Hamano
Message 10 of 10 in “Fix potential hang in https handshake.”
  1. szager@google.comOct 18, 2012
  2. Junio C HamanoOct 18, 2012
  3. Jeff KingOct 19, 2012
  4. Shawn PearceOct 19, 2012
  5. Daniel StenbergOct 19, 2012
  6. Jeff KingOct 19, 2012
  7. Stefan ZagerOct 19, 2012
  8. Jeff KingOct 19, 2012
  9. Junio C HamanoOct 19, 2012
  10. Junio C HamanoOct 19, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.