update upstream-2021-08-15

This commit is contained in:
Chengyi Zhao 2021-08-15 02:35:23 +08:00
parent c8653c13fa
commit 1703683def
297 changed files with 91782 additions and 54869 deletions

View file

@ -239,8 +239,13 @@ int pa_unix_socket_is_stale(const char *fn) {
sa.sun_path[sizeof(sa.sun_path) - 1] = 0;
if (connect(fd, (struct sockaddr*) &sa, sizeof(sa)) < 0) {
#if !defined(OS_IS_WIN32)
if (errno == ECONNREFUSED)
ret = 1;
#else
if (WSAGetLastError() == WSAECONNREFUSED || WSAGetLastError() == WSAEINVAL)
ret = 1;
#endif
} else
ret = 0;