[client] Replace windows network monitor implementation (#2450)

This new one uses functions from netioapi.h to monitor route changes.
This change ensures that we include routes that point to virtual
interfaces, such as vEthernet created by the Hyper-V Virtual Switch.
This commit is contained in:
Viktor Liu
2024-08-20 19:13:16 +02:00
committed by GitHub
parent 2a30db02bb
commit 80b0db80bc
4 changed files with 338 additions and 269 deletions

View File

@ -59,7 +59,7 @@ func (nw *NetworkMonitor) Start(ctx context.Context, callback func()) (err error
// recover in case sys ops panic
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("panic occurred: %v, stack trace: %s", r, string(debug.Stack()))
err = fmt.Errorf("panic occurred: %v, stack trace: %s", r, debug.Stack())
}
}()