summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-11 20:27:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-11 20:27:06 (GMT)
commit838eaa9a225a30dd1297d354e8720560a36b7e64 (patch)
tree41028fe72efcb9f7fd4472d8dc6b2628d0a95e40
parentaec68c3dde55601796ceee5f97cc362d58a9bd54 (diff)
parent1f180e5eb902cda0ed73c250a27699daef827d59 (diff)
downloadgit-838eaa9a225a30dd1297d354e8720560a36b7e64.zip
git-838eaa9a225a30dd1297d354e8720560a36b7e64.tar.gz
git-838eaa9a225a30dd1297d354e8720560a36b7e64.tar.bz2
Merge branch 'dl/credential-cache-socket-in-xdg-cache'
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 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");