summaryrefslogtreecommitdiff
path: root/credential-cache.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-08-11 13:27:06 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-11 13:27:06 -0700
commit838eaa9a225a30dd1297d354e8720560a36b7e64 (patch)
tree41028fe72efcb9f7fd4472d8dc6b2628d0a95e40 /credential-cache.c
parentMerge branch 'rg/rerere-train-overwrite' (diff)
parentcredential-cache: interpret an ECONNRESET as an EOF (diff)
downloadtgif-838eaa9a225a30dd1297d354e8720560a36b7e64.tar.xz
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
Diffstat (limited to 'credential-cache.c')
-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");