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.
This commit is contained in:
delthas 2022-04-24 18:50:59 +02:00 committed by Simon Ser
parent 2a0cc57e3a
commit 5ae1ec5381

View File

@ -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)
}