Update network handler usages

This commit is contained in:
世界 2024-10-20 13:42:53 +08:00
parent a8ae222eeb
commit 99eea00432
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
12 changed files with 51 additions and 78 deletions

View file

@ -1,7 +1,6 @@
package tun
import (
"context"
"net/netip"
"os"
"runtime"
@ -20,7 +19,7 @@ const (
userEnd uint32 = 0xFFFFFFFF - 1
)
func (o *Options) BuildAndroidRules(packageManager PackageManager, errorHandler E.Handler) {
func (o *Options) BuildAndroidRules(packageManager PackageManager) {
var includeUser []uint32
if len(o.IncludeAndroidUser) > 0 {
o.IncludeAndroidUser = common.Uniq(o.IncludeAndroidUser)
@ -64,7 +63,9 @@ func (o *Options) BuildAndroidRules(packageManager PackageManager, errorHandler
}
continue
}
errorHandler.NewError(context.Background(), E.New("package to include not found: ", packageName))
if o.Logger != nil {
o.Logger.Debug("package to include not found: ", packageName)
}
}
}
if len(o.ExcludePackage) > 0 {
@ -81,7 +82,9 @@ func (o *Options) BuildAndroidRules(packageManager PackageManager, errorHandler
}
continue
}
errorHandler.NewError(context.Background(), E.New("package to exclude not found: ", packageName))
if o.Logger != nil {
o.Logger.Debug("package to exclude not found: ", packageName)
}
}
}
}