Fixing an issue where packets are dropped each time

we change wg configuration
This commit is contained in:
Tim Beatham
2023-11-01 10:39:46 +00:00
parent a1caf2e8ae
commit e63edea763
6 changed files with 30 additions and 14 deletions

View File

@ -1,9 +1,5 @@
package lib
import (
logging "github.com/tim-beatham/wgmesh/pkg/log"
)
// MapToSlice converts a map to a slice in go
func MapValues[K comparable, V any](m map[K]V) []V {
return MapValuesWithExclude(m, map[K]struct{}{})
@ -23,8 +19,6 @@ func MapValuesWithExclude[K comparable, V any](m map[K]V, exclude map[K]struct{}
continue
}
logging.Log.WriteInfof("Key %s", k)
values[i] = v
i++
}