Skip to content

Commit 0f9f914

Browse files
committed
Fixed bug in cached port comparators
1 parent e405403 commit 0f9f914

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ func (d *DFUDiscovery) sendUpdates(eventCB discovery.EventCallback, errorCB disc
8989
newCache := map[string]*discovery.Port{}
9090
for _, dfuIf := range d.getDFUInterfaces() {
9191
newPort := dfuIf.AsDiscoveryPort()
92+
newCache[newPort.Address] = newPort
9293
if _, exist := d.portsCache[newPort.Address]; !exist {
9394
eventCB("add", newPort)
94-
newCache[newPort.Address] = newPort
9595
}
9696
}
9797

0 commit comments

Comments
 (0)