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

Re: counting the number of connections?

From
David Kågedal <davidk@lysator.liu.se>
Date
Mar 5, 2009, 16:18 UTC
Message-ID
<87ab80j649.fsf@krank.kagedal.org>
In-Reply-To
<be6fef0d0902272244q468b1fa4sacdc15afa9a65f15@mail.gmail.com>
Tay Ray Chuan <rctay89@gmail.com> writes:
Show 15 quoted lines
> Hi,
>
> some time ago I noticed curl doesn't remember your credentials (apart
> from those it can get from ~/.netrc), and very recently there was an
> thread on repeated prompting for credentials while pushing to https.
>
> I've written a simple patch series, which allows git to play nice
> without curl_multi. That is, git uses a single persistent connection
> throughout.
>
> However, I'm at a loss at how to test for this. How does one count the
> number of connections made during the lifespan of a program's
> execution? So far, I've been relying on my firewall log (Comodo on
> windows). Perhaps there a more operating system/software-agnostic
> method to do this?

You could set up a single-use tcp forwarder which will make any second connection fail. Using socat, for instance:

  $ socat tcp-listen:2222,bind=localhost tcp:my.server:22 &
  $ nc localhost 2222
  SSH-2.0-OpenSSH_5.1p1 Debian-3ubuntu1
  ^C
  $ nc localhost 2222
  localhost [127.0.0.1] 2222 (?) : Connection refused
-- 
David Kågedal
Previous: Tay Ray ChuanNext: Johannes Schindelin
Message 2 of 3 in “counting the number of connections?”
  1. Tay Ray ChuanFeb 28, 2009
  2. David KågedalMar 5, 2009
  3. Johannes SchindelinMar 5, 2009

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.