Bläddra i källkod

lib/connections: Actually make connection attempts for lower priority addresses as well

Skip-check: authors

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4535
xjtdy888 8 år sedan
förälder
incheckning
8606b4dd8d
1 ändrade filer med 1 tillägg och 2 borttagningar
  1. 1 2
      lib/connections/service.go

+ 1 - 2
lib/connections/service.go

@@ -756,12 +756,11 @@ func dialParallel(deviceID protocol.DeviceID, dialTargets []dialTarget) (interna
 					conn.Close()
 				}
 			}(deviceID, prio)
+			return conn, ok
 		} else {
 			// Failed to connect, report that fact.
 			l.Debugln("failed to connect to", deviceID, prio)
 		}
-
-		return conn, ok
 	}
 	return internalConn{}, false
 }