1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-15 00:26:10 +02:00

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
This commit is contained in:
Junio C Hamano 2017-08-23 14:33:45 -07:00
commit cdc55aad7d

View File

@ -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");