Skip to content

Commit 73d4e7b

Browse files
rimrulGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
credential-cache: handle ECONNREFUSED gracefully
In 245670c (credential-cache: check for windows specific errors, 2021-09-14) we concluded that on Windows we would always encounter ENETDOWN where we would expect ECONNREFUSED on POSIX systems, when connecting to unix sockets. As reported in [1], we do encounter ECONNREFUSED on Windows if the socket file doesn't exist, but the containing directory does and ENETDOWN if neither exists. We should handle this case like we do on non-windows systems. [1] #4762 (comment) This fixes #5314 Helped-by: M Hickford <[email protected]> Signed-off-by: Matthias Aßhauer <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 82b762b commit 73d4e7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/credential-cache.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static int connection_closed(int error)
2323

2424
static int connection_fatally_broken(int error)
2525
{
26-
return (error != ENOENT) && (error != ENETDOWN);
26+
return (error != ENOENT) && (error != ENETDOWN) && (error != ECONNREFUSED);
2727
}
2828

2929
#else

0 commit comments

Comments
 (0)