summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-23 14:33:45 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-23 14:33:45 -0700
commitcdc55aad7d26c709cc7f64c70eb9fb9057508701 (patch)
tree5d81153663649395165c9710781bffd93e668ca0
parentb9e56be086ffa4f8431082a6fb25225e79e5bbc8 (diff)
parent1f180e5eb902cda0ed73c250a27699daef827d59 (diff)
downloadgit-cdc55aad7d26c709cc7f64c70eb9fb9057508701.tar.gz
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
-rw-r--r--credential-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/credential-cache.c b/credential-cache.c
index 91550bfb0b..1cccc3a0b9 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");