mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +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:
@ -360,6 +360,14 @@ StreamLogicalLog(void)
|
||||
struct timeval timeout;
|
||||
struct timeval *timeoutptr = NULL;
|
||||
|
||||
if (PQsocket(conn) < 0)
|
||||
{
|
||||
fprintf(stderr,
|
||||
_("%s: invalid socket: %s"),
|
||||
progname, PQerrorMessage(conn));
|
||||
goto error;
|
||||
}
|
||||
|
||||
FD_ZERO(&input_mask);
|
||||
FD_SET(PQsocket(conn), &input_mask);
|
||||
|
||||
|
Reference in New Issue
Block a user