Commit 9f335089 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Fix crash under MacOS while investigating #2332

MacOS will return EINVAL under e.g. setsockopt if the connection was
reset.
parent 941087b4
......@@ -577,6 +577,13 @@ VTCP_Check(int a)
*/
if (errno == EINVAL || errno == ETIMEDOUT || errno == EPIPE)
return (1);
#elif defined (__APPLE__)
/*
* MacOS returns EINVAL if the other end unexpectedly reset
* the connection.
*/
if (errno == EINVAL)
return (1);
#endif
return (0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment