portlist: stop logging stray UDP ports
These "weird" port lines show up in logs frequently.
They're the result of uninteresting races,
and they're not actionable. Remove the noise.
Remove the isLoopbackAddr case to placate staticcheck.
"bytes"
"fmt"
"log"
- "os"
"os/exec"
"strings"
"sync/atomic"
@@ -99,10 +98,8 @@ type ProtoPort struct {
switch {
case p != nil:
p.Process = cmd
- case isLoopbackAddr(val):
- // ignore
default:
- fmt.Fprintf(os.Stderr, "weird: missing %v\n", pp)
+ // ignore: processes and ports come and go
}
}
}
