File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -364,12 +364,15 @@ func (c *Conn) RemoveAllPeers() error {
364
364
}
365
365
366
366
// UpdateNodes connects with a set of peers. This can be constantly updated,
367
- // and peers will continually be reconnected as necessary.
368
- func (c * Conn ) UpdateNodes (nodes []* Node , replace bool ) error {
367
+ // and peers will continually be reconnected as necessary. If replacePeers is
368
+ // true, all peers will be removed before adding the new ones.
369
+ //
370
+ //nolint:revive // Complains about replacePeers.
371
+ func (c * Conn ) UpdateNodes (nodes []* Node , replacePeers bool ) error {
369
372
c .mutex .Lock ()
370
373
defer c .mutex .Unlock ()
371
374
status := c .Status ()
372
- if replace {
375
+ if replacePeers {
373
376
c .netMap .Peers = []* tailcfg.Node {}
374
377
c .peerMap = map [tailcfg.NodeID ]* tailcfg.Node {}
375
378
}
You can’t perform that action at this time.
0 commit comments