From 5ae1ec5381e6b3d0e66aacf5a54d1087b8547b60 Mon Sep 17 00:00:00 2001 From: delthas Date: Sun, 24 Apr 2022 18:50:59 +0200 Subject: [PATCH] Fix network.forEachDownstream exiting on first non-match This fixes a serious bug where we stop executing forEachDownstream on the first downstream that does not match the network. Instead we want to simply continue; it's a basic filter. --- user.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user.go b/user.go index 0810baa..9b7879f 100644 --- a/user.go +++ b/user.go @@ -158,10 +158,10 @@ func newNetwork(user *user, record *Network, channels []Channel) *network { func (net *network) forEachDownstream(f func(*downstreamConn)) { for _, dc := range net.user.downstreamConns { if dc.network == nil && !dc.isMultiUpstream { - return + continue } if dc.network != nil && dc.network != net { - return + continue } f(dc) }