diff options
Diffstat (limited to 'src/pq/pq_event.c')
-rw-r--r-- | src/pq/pq_event.c | 8 |
1 files 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) | |||
192 | 192 | ||
193 | GNUNET_assert (0 == | 193 | GNUNET_assert (0 == |
194 | pthread_mutex_lock (&db->notify_lock)); | 194 | pthread_mutex_lock (&db->notify_lock)); |
195 | PQconsumeInput (db->conn); | 195 | if (1 != |
196 | PQconsumeInput (db->conn)) | ||
197 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
198 | "Failed to read from Postgres: %s\n", | ||
199 | PQerrorMessage (db->conn)); | ||
196 | while (NULL != (n = PQnotifies (db->conn))) | 200 | while (NULL != (n = PQnotifies (db->conn))) |
197 | { | 201 | { |
198 | struct GNUNET_ShortHashCode sh; | 202 | struct GNUNET_ShortHashCode sh; |
@@ -264,7 +268,7 @@ do_scheduler_notify (void *cls) | |||
264 | GNUNET_assert (NULL != db->rfd); | 268 | GNUNET_assert (NULL != db->rfd); |
265 | GNUNET_PQ_event_do_poll (db); | 269 | GNUNET_PQ_event_do_poll (db); |
266 | db->event_task | 270 | db->event_task |
267 | = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_ZERO, | 271 | = GNUNET_SCHEDULER_add_read_net (GNUNET_TIME_UNIT_FOREVER_REL, |
268 | db->rfd, | 272 | db->rfd, |
269 | &do_scheduler_notify, | 273 | &do_scheduler_notify, |
270 | db); | 274 | db); |