From: Junio C Hamano Date: Fri, 22 Aug 2014 15:56:12 GMT Subject: Re: [PATCH] upload-pack: keep poll(2)'s timeout to -1 Message-ID: In-Reply-To: <20140822154445.GA19135@peff.net> Jeff King writes: > Since we're now translating the keepalive value, and since there's no > way to set it to "0" (nor would that really have any meaning), I guess > we could switch the internal "no keepalive" value to 0, and do: > > ret = poll(pfd, pollsize, keepalive ? 1000 * keepalive : -1); > > which would let us avoid setting it to -1 in some other spots. I dunno > if that actually makes a real difference to maintainability, though. Where we parse and set the value of the variable, we do this: else if (!strcmp("uploadpack.keepalive", var)) { keepalive = git_config_int(var, value); if (!keepalive) keepalive = -1; } The condition may have to become "if (keepalive <= 0)". > Either way: > > Acked-by: Jeff King > > -Peff Yeah, either way, the patch as-posted is good. Thanks.