Remove defaultInterfaceName when no route

This commit is contained in:
世界 2023-09-20 14:08:16 +08:00
parent 7545dc2d56
commit 9c933ea553
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -81,6 +81,7 @@ func (m *defaultInterfaceMonitor) delayCheckUpdate() {
}
err = m.checkUpdate()
if errors.Is(err, ErrNoRoute) {
m.defaultInterfaceName = ""
m.defaultInterfaceIndex = -1
m.emit(EventNoRoute)
}