Fix monitor

This commit is contained in:
世界 2023-08-07 19:54:17 +08:00
parent 59b86002c4
commit 0a68b9f1d8
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
9 changed files with 80 additions and 87 deletions

View file

@ -5,6 +5,7 @@ import (
"github.com/sagernet/sing-tun/internal/winipcfg"
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/logger"
"github.com/sagernet/sing/common/x/list"
"golang.org/x/sys/windows"
@ -17,11 +18,12 @@ type networkUpdateMonitor struct {
access sync.Mutex
callbacks list.List[NetworkUpdateCallback]
logger logger.Logger
}
func NewNetworkUpdateMonitor(errorHandler E.Handler) (NetworkUpdateMonitor, error) {
func NewNetworkUpdateMonitor(logger logger.Logger) (NetworkUpdateMonitor, error) {
return &networkUpdateMonitor{
errorHandler: errorHandler,
logger: logger,
}, nil
}