mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Handle invalid libpq sockets in more places
Also, make error messages consistent. From: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
@ -705,6 +705,12 @@ try_complete_step(Step *step, int flags)
|
||||
PGresult *res;
|
||||
bool canceled = false;
|
||||
|
||||
if (sock < 0)
|
||||
{
|
||||
fprintf(stderr, "invalid socket: %s", PQerrorMessage(conn));
|
||||
exit_nicely();
|
||||
}
|
||||
|
||||
gettimeofday(&start_time, NULL);
|
||||
FD_ZERO(&read_set);
|
||||
|
||||
|
Reference in New Issue
Block a user