diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-08-23 21:33:45 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-08-23 21:33:45 (GMT) |
commit | cdc55aad7d26c709cc7f64c70eb9fb9057508701 (patch) | |
tree | 5d81153663649395165c9710781bffd93e668ca0 /credential-cache.c | |
parent | b9e56be086ffa4f8431082a6fb25225e79e5bbc8 (diff) | |
parent | 1f180e5eb902cda0ed73c250a27699daef827d59 (diff) | |
download | git-cdc55aad7d26c709cc7f64c70eb9fb9057508701.zip git-cdc55aad7d26c709cc7f64c70eb9fb9057508701.tar.gz git-cdc55aad7d26c709cc7f64c70eb9fb9057508701.tar.bz2 |
Merge branch 'dl/credential-cache-socket-in-xdg-cache' into maint
A recently added test for the "credential-cache" helper revealed
that EOF detection done around the time the connection to the cache
daemon is torn down were flaky. This was fixed by reacting to
ECONNRESET and behaving as if we got an EOF.
* dl/credential-cache-socket-in-xdg-cache:
credential-cache: interpret an ECONNRESET as an EOF
Diffstat (limited to 'credential-cache.c')
-rw-r--r-- | credential-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/credential-cache.c b/credential-cache.c index 91550bf..1cccc3a 100644 --- a/credential-cache.c +++ b/credential-cache.c @@ -25,7 +25,7 @@ static int send_request(const char *socket, const struct strbuf *out) int r; r = read_in_full(fd, in, sizeof(in)); - if (r == 0) + if (r == 0 || (r < 0 && errno == ECONNRESET)) break; if (r < 0) die_errno("read error from cache daemon"); |