[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -fix busy loop
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -fix busy loop |
Date: |
Sun, 01 Aug 2021 22:11:39 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 39b19b0ca -fix busy loop
39b19b0ca is described below
commit 39b19b0ca9d004b4cbe67d2f09c2a1e9eab03c19
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Aug 1 22:08:18 2021 +0200
-fix busy loop
---
src/pq/pq_event.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/pq/pq_event.c b/src/pq/pq_event.c
index bf845db18..e6c2d07fd 100644
--- a/src/pq/pq_event.c
+++ b/src/pq/pq_event.c
@@ -192,7 +192,11 @@ GNUNET_PQ_event_do_poll (struct GNUNET_PQ_Context *db)
GNUNET_assert (0 ==
pthread_mutex_lock (&db->notify_lock));
- PQconsumeInput (db->conn);
+ if (1 !=
+ PQconsumeInput (db->conn))
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to read from Postgres: %s\n",
+ PQerrorMessage (db->conn));
while (NULL != (n = PQnotifies (db->conn)))
{
struct GNUNET_ShortHashCode sh;
@@ -264,7 +268,7 @@ do_scheduler_notify (void *cls)
GNUNET_assert (NULL != db->rfd);
GNUNET_PQ_event_do_poll (db);
db->event_task
- = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_ZERO,
+ = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL,
db->rfd,
&do_scheduler_notify,
db);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -fix busy loop,
gnunet <=