4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-16 08:56:07 +00:00

attempt to keep TCP listener alive if there's a temporary error (e.g. too many open files), just pause and retry later

This commit is contained in:
Arceliar
2020-10-18 11:01:18 -05:00
parent 9eb4981ac1
commit 1d1c6efa1f
2 changed files with 10 additions and 2 deletions

View File

@ -191,7 +191,9 @@ func (m *Multicast) getAllowedInterfaces() map[string]net.Interface {
// Ask the system for network interfaces
allifaces, err := net.Interfaces()
if err != nil {
panic(err)
// Don't panic, since this may be from e.g. too many open files (from too much connection spam)
// TODO? log something
return nil
}
// Work out which interfaces to announce on
for _, iface := range allifaces {