mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-03 05:12:56 -05:00
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] https://github.com/git-for-windows/git/pull/4762#issuecomment-2545498245
This fixes https://github.com/git-for-windows/git/issues/5314
Helped-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Matthias Aßhauer <mha1993@live.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
committed by
Git for Windows Build Agent
parent
3fc7f4bcaf
commit
d3bfec7f23
@@ -23,7 +23,7 @@ static int connection_closed(int error)
|
||||
|
||||
static int connection_fatally_broken(int error)
|
||||
{
|
||||
return (error != ENOENT) && (error != ENETDOWN);
|
||||
return (error != ENOENT) && (error != ENETDOWN) && (error != ECONNREFUSED);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user