Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ba19a6b

Browse files
committed
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
1 parent 4f4061b commit ba19a6b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/interfaces/libpq/fe-connect.c

+4
Original file line numberDiff line numberDiff line change
@@ -2025,7 +2025,11 @@ connectDBComplete(PGconn *conn)
20252025
{
20262026
if (!parse_int_param(conn->connect_timeout, &timeout, conn,
20272027
"connect_timeout"))
2028+
{
2029+
/* mark the connection as bad to report the parsing failure */
2030+
conn->status = CONNECTION_BAD;
20282031
return 0;
2032+
}
20292033

20302034
if (timeout > 0)
20312035
{

0 commit comments

Comments
 (0)