mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Fix error reporting of connect_timeout in libpq for value parsing
The logic was correctly detecting a parsing failure, but the parsing error did not get reported back to the client properly. Reported-by: Ed Morley Author: Lars Kanis Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/a9b4cbd7-4ecb-06b2-ebd7-1739bbff3217@greiz-reinsdorf.de Backpatch-through: 12
This commit is contained in:
parent
4f4061b2dd
commit
ba19a6b73c
@ -2025,7 +2025,11 @@ connectDBComplete(PGconn *conn)
|
||||
{
|
||||
if (!parse_int_param(conn->connect_timeout, &timeout, conn,
|
||||
"connect_timeout"))
|
||||
{
|
||||
/* mark the connection as bad to report the parsing failure */
|
||||
conn->status = CONNECTION_BAD;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (timeout > 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user