mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
UPnP discovery fix for devices that send multiple response packets
Fix UPnP discovery and port mapping issues reported in #896
This commit is contained in:
parent
4183044e96
commit
b7bb3bfee2
@ -210,6 +210,17 @@ Mx: %d
|
|||||||
|
|
||||||
// Collect our results from the result handlers using the result channel
|
// Collect our results from the result handlers using the result channel
|
||||||
for result := range resultChannel {
|
for result := range resultChannel {
|
||||||
|
// Check for existing results (some routers send multiple response packets)
|
||||||
|
for _, existingResult := range results {
|
||||||
|
if existingResult.uuid == result.uuid {
|
||||||
|
if debug {
|
||||||
|
l.Debugln("Already processed device with UUID", existingResult.uuid, "continuing...")
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// No existing results, okay to append
|
||||||
results = append(results, result)
|
results = append(results, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user