Re: [PATCH] remote-curl: don't hang when a server dies before any output
- From
Jeff King <peff@peff.net>
- Date
- Nov 18, 2016, 17:08 UTC
- Message-ID
- <20161118170855.22p3vhcocdxgmpy4@sigill.intra.peff.net>
- In-Reply-To
- <764305554fa74779ad5fb956aa2b658a@EXMBNJE7.ad.twosigma.com>
On Fri, Nov 18, 2016 at 05:04:59PM +0000, David Turner wrote:
Show 8 quoted lines
> > So I don't feel like we have a good patch for the general case yet, > > and I'm probably not going to get around to implementing it anytime > > soon. > > I'm confused -- it sounds like your patch actually does work (that is, > that Junio's failure was not caused by your patch but by the absence > of our patches). And your patch handles more cases than mine. So we > should probably use it instead of mine.
No, mine passes the vanilla test suite, but fails with GIT_TEST_LONG. If the want/have negotiation takes multiple rounds, the intermediate rounds don't end on a flush packet, and my patch causes remote-curl to complain that the response was truncated.
I think you could fix it by teaching remote-curl that the final packet must be a flush _or_ contain an ACK/NAK, but I didn't try it. That's getting a bit invasive and brittle.
-Peff