mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 18:26:52 +01:00
lighthouse: Never block in QueryServer, drop queries when the channel is full (#1910)
This commit is contained in:
1 parent
7cfa47d569
commit
d5062dacf0
4 files changed
+71
-5
No files matched your search
@@ -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{}{}
|
||||
|
||||
Reference in new issue
Block a user