mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -331,7 +331,7 @@ libpq_select(int timeout_ms)
|
||||
if (PQsocket(streamConn) < 0)
|
||||
ereport(ERROR,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("socket not open")));
|
||||
errmsg("invalid socket: %s", PQerrorMessage(streamConn))));
|
||||
|
||||
/* We use poll(2) if available, otherwise select(2) */
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user