From 145e92db133dea6a061fadc14f50e074549bc399 Mon Sep 17 00:00:00 2001 From: Will Brown Date: Sun, 24 Nov 2024 17:38:18 -0500 Subject: [PATCH] [main.c] libpq will have status PGRES_TUPLES_OK when command is done --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index c824673..4df7b53 100644 --- a/main.c +++ b/main.c @@ -82,7 +82,9 @@ static void timer_retrieve_feeds(struct discord *client, struct discord_timer *t PGresult *database_res; while ((database_res = PQgetResult(database_conn))) { if (PQresultStatus(database_res) != PGRES_SINGLE_TUPLE) { - log_error("Unable to retrieve feed: %s", PQresultErrorMessage(database_res)); + if (PQresultStatus(database_res) != PGRES_TUPLES_OK) { + log_error("Unable to retrieve feeds: %s", PQresultErrorMessage(database_res)); + } goto db_loop_end; }