mirror of
https://github.com/SagerNet/sing-tun.git
synced 2025-04-03 03:47:39 +03:00
Fix monitor
This commit is contained in:
parent
d105263fed
commit
6a7c4036d3
4 changed files with 13 additions and 9 deletions
|
@ -107,11 +107,10 @@ func (m *networkUpdateMonitor) Close() error {
|
|||
}
|
||||
|
||||
func (m *defaultInterfaceMonitor) checkUpdate() error {
|
||||
err := m.interfaceFinder.Update()
|
||||
if err != nil {
|
||||
return E.Cause(err, "update interfaces")
|
||||
}
|
||||
var defaultInterface *control.Interface
|
||||
var (
|
||||
defaultInterface *control.Interface
|
||||
err error
|
||||
)
|
||||
if m.underNetworkExtension {
|
||||
defaultInterface, err = m.getDefaultInterfaceBySocket()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue