Fix wrong condition on interface check

This commit is contained in:
Zxneric 2024-11-29 22:45:49 +08:00 committed by 世界
parent c21c623174
commit 618d3f9a52
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -108,7 +108,7 @@ func (m *defaultInterfaceMonitor) checkUpdate() error {
return E.Cause(err, "find updated interface: ", alias)
}
m.defaultInterface.Store(newInterface)
if oldInterface != nil && !oldInterface.Equals(*newInterface) {
if oldInterface != nil && oldInterface.Equals(*newInterface) {
return nil
}
m.emit(newInterface, 0)