lighthouse: Never block in QueryServer, drop queries when the channel is full (#1910)

This commit is contained in:
Nate Brown authored and GitHub committed 2026-09-30 15:26:34 -05:00
1 parent 7cfa47d569
commit d5062dacf0
4 files changed
+71 -5

No files matched your search

+3
View File
@@ -7,6 +7,7 @@ import (
"testing"
"time"
"github.com/rcrowley/go-metrics"
"github.com/slackhq/nebula/cert"
"github.com/slackhq/nebula/config"
"github.com/slackhq/nebula/overlay/overlaytest"
@@ -21,6 +22,8 @@ func newTestLighthouse() *LightHouse {
l: test.NewLogger(),
addrMap: map[netip.Addr]*RemoteList{},
queryChan: make(chan netip.Addr, 10),
// Nothing drains queryChan here, so an 11th query is dropped.
queryDropped: metrics.NilCounter{},
}
lighthouses := []netip.Addr{}
staticList := map[netip.Addr]struct{}{}