Skip to content

Commit

Permalink
watcher: avoid logspam
Browse files Browse the repository at this point in the history
  • Loading branch information
USA-RedDragon committed Feb 17, 2024
1 parent 6c0e413 commit f8c0470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/ifacewatcher/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (w *Watcher) watch() {

// Loop through net.Interfaces() and check if any are missing from w.interfaces
for _, iface := range interfaces {
if strings.HasPrefix(iface.Name, "wg") && iface.Name != "wg0" && w.wgInterfaceActive(_iface{iface, nil}) {
if strings.HasPrefix(iface.Name, "wg") && iface.Name != "wg0" && w.wgInterfaceActive(_iface{iface, nil}) && !ifaceContainsNetInterface(w.interfaces, iface) {
fmt.Printf("Interface %s is now present\n", iface.Name)
tunnel := w.findTunnel(iface)
if tunnel == nil {
Expand Down

0 comments on commit f8c0470

Please sign in to comment.