summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-03-03 18:41:36 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-03-03 18:41:36 +0100
commit195be08c47edeaf28bf7c2371ccb4178bbeaae83 (patch)
treee8161fca4a814a49cda9efb6d937c5902f781081 /src/peer.c
parentff78f87f9b2aae9a5e2e88612fb0c07061919d11 (diff)
downloadfastd-195be08c47edeaf28bf7c2371ccb4178bbeaae83.tar
fastd-195be08c47edeaf28bf7c2371ccb4178bbeaae83.zip
Make 'peer limit 0' allow no connections
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/peer.c b/src/peer.c
index a20e0c8..c3279fb 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -381,7 +381,7 @@ bool fastd_peer_may_connect(fastd_context_t *ctx, fastd_peer_t *peer) {
fastd_peer_group_t *group;
for (group = peer->group; group; group = group->parent) {
- if (!group->conf->max_connections)
+ if (group->conf->max_connections < 0)
continue;
if (count_established_group_peers(ctx, group) >= group->conf->max_connections)