diff options
author | David Barksdale <amatus@amat.us> | 2018-01-10 13:15:12 -0600 |
---|---|---|
committer | David Barksdale <amatus@amat.us> | 2018-01-10 13:15:12 -0600 |
commit | c9a693fc4221ddcec8c0582174ad87488ea64650 (patch) | |
tree | 1a4435e1e573fa7d4f05089edc8697163bec9884 /src/fs | |
parent | c66e64df31713e5e97297300ec8b39536da1369b (diff) | |
download | gnunet-c9a693fc4221ddcec8c0582174ad87488ea64650.tar.gz gnunet-c9a693fc4221ddcec8c0582174ad87488ea64650.zip |
Try to keep the fs->core MQ from growing too large
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 817aed257..6e28ca606 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -1230,7 +1230,9 @@ handle_p2p_get (void *cls, | |||
1230 | GNUNET_NO); | 1230 | GNUNET_NO); |
1231 | return; | 1231 | return; |
1232 | } | 1232 | } |
1233 | if (cp->ppd.pending_replies + cp->delay_queue_size > MAX_QUEUE_PER_PEER) | 1233 | unsigned int queue_size = GNUNET_MQ_get_length (cp->mq); |
1234 | queue_size += cp->ppd.pending_replies + cp->delay_queue_size; | ||
1235 | if (queue_size > MAX_QUEUE_PER_PEER) | ||
1234 | { | 1236 | { |
1235 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1237 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1236 | "Peer `%s' has too many replies queued already. Dropping query.\n", | 1238 | "Peer `%s' has too many replies queued already. Dropping query.\n", |