[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: limit queue size CORE maint
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: limit queue size CORE maintains for any client, warn if we exceed it |
Date: |
Thu, 23 Feb 2017 15:44:09 +0100 |
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 5c9c418d2 limit queue size CORE maintains for any client, warn if we
exceed it
5c9c418d2 is described below
commit 5c9c418d2b7ac6cf10c577fb9c6bc687cb3b4a09
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Feb 23 15:44:06 2017 +0100
limit queue size CORE maintains for any client, warn if we exceed it
---
src/core/gnunet-service-core.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c
index 52c6f72ab..6a126e6dd 100644
--- a/src/core/gnunet-service-core.c
+++ b/src/core/gnunet-service-core.c
@@ -32,11 +32,11 @@
#include "gnunet-service-core_typemap.h"
/**
- * How many messages do we queue up at most for optional
- * notifications to a client? (this can cause notifications
- * about outgoing messages to be dropped).
+ * How many messages do we queue up at most for any client? This can
+ * cause messages to be dropped if clients do not process them fast
+ * enough!
*/
-#define MAX_NOTIFY_QUEUE 1024
+#define MAX_QUEUE 128
/**
@@ -834,6 +834,24 @@ GSC_CLIENTS_deliver_message (const struct
GNUNET_PeerIdentity *sender,
if ( (0 != (options & GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND)) &&
(0 != (c->options & GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND)) )
continue;
+ if (MAX_QUEUE < GNUNET_MQ_get_length (c->mq))
+ {
+ char buf[1024];
+
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING | GNUNET_ERROR_TYPE_BULK,
+ "Dropping decrypted message of type %u as client is too busy
(queue full)\n",
+ (unsigned int) ntohs (msg->type));
+ GNUNET_snprintf (buf,
+ sizeof (buf),
+ gettext_noop ("# messages of type %u discarded (client
busy)"),
+ (unsigned int) ntohs (msg->type));
+ GNUNET_STATISTICS_update (GSC_stats,
+ buf,
+ 1,
+ GNUNET_NO);
+ continue;
+ }
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending %u message with %u bytes to client interested in
messages of type %u.\n",
options,
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: limit queue size CORE maintains for any client, warn if we exceed it,
gnunet <=