mirror of https://github.com/citusdata/citus.git
Fix error handling in connection_management
parent
224b0a8c14
commit
98ffafe16e
|
@ -533,20 +533,27 @@ FinishConnectionEstablishment(MultiConnection *connection)
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (pollResult != EINTR)
|
|
||||||
{
|
|
||||||
/* Retrying, signal interrupted. So check. */
|
|
||||||
CHECK_FOR_INTERRUPTS();
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
int errorCode = errno;
|
||||||
* We ERROR here, instead of just returning a failed
|
#ifdef WIN32
|
||||||
* connection, because this shouldn't happen, and indicates a
|
errorCode = WSAGetLastError();
|
||||||
* programming error somewhere, not a network etc. issue.
|
#endif
|
||||||
*/
|
if (errorCode == EINTR)
|
||||||
ereport(ERROR, (errcode_for_socket_access(),
|
{
|
||||||
errmsg("poll() failed: %m")));
|
/* Retrying, signal interrupted. So check. */
|
||||||
|
CHECK_FOR_INTERRUPTS();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* We ERROR here, instead of just returning a failed
|
||||||
|
* connection, because this shouldn't happen, and indicates a
|
||||||
|
* programming error somewhere, not a network etc. issue.
|
||||||
|
*/
|
||||||
|
ereport(ERROR, (errcode_for_socket_access(),
|
||||||
|
errmsg("poll()/select() failed: %m")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue