aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-23 19:17:13 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-23 19:17:18 +0200
commit7ef7bdccf14ef6aee7f2116f1bce4c673d20e673 (patch)
tree27ef191f3ad0201269e29213b1b4f1b0c14e8fc7
parentee18935039634bda33fa679dd5586c5e28be0693 (diff)
downloadgnunet-7ef7bdccf14ef6aee7f2116f1bce4c673d20e673.tar.gz
gnunet-7ef7bdccf14ef6aee7f2116f1bce4c673d20e673.zip
-better DB status check
-rw-r--r--src/pq/pq_connect.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index fd73cf0d8..fa8ad86a0 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -312,6 +312,9 @@ GNUNET_PQ_run_sql (struct GNUNET_PQ_Context *db,
312void 312void
313GNUNET_PQ_reconnect_if_down (struct GNUNET_PQ_Context *db) 313GNUNET_PQ_reconnect_if_down (struct GNUNET_PQ_Context *db)
314{ 314{
315 if (1 ==
316 PQ_consumeInput (db->conn))
317 return;
315 if (CONNECTION_BAD != PQstatus (db->conn)) 318 if (CONNECTION_BAD != PQstatus (db->conn))
316 return; 319 return;
317 GNUNET_PQ_reconnect (db); 320 GNUNET_PQ_reconnect (db);