Просмотр исходного кода

Fix: use full hasInitialProtocols check

- Also checks if initial protocol list is empty
Rod Hynes 1 год назад
Родитель
Сommit
634afd7fcc
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      psiphon/controller.go

+ 2 - 2
psiphon/controller.go

@@ -1975,7 +1975,7 @@ func (controller *Controller) launchEstablishing() {
 			constraints: &copyConstraints,
 			constraints: &copyConstraints,
 		})
 		})
 
 
-	if controller.protocolSelectionConstraints.initialLimitTunnelProtocolsCandidateCount > 0 ||
+	if controller.protocolSelectionConstraints.hasInitialProtocols() ||
 		tunnelPoolSize > 1 {
 		tunnelPoolSize > 1 {
 
 
 		// Perform a synchronous scan over server entries in order to check if
 		// Perform a synchronous scan over server entries in order to check if
@@ -2009,7 +2009,7 @@ func (controller *Controller) doConstraintsScan() {
 	// to happen quickly in the typical case.
 	// to happen quickly in the typical case.
 
 
 	hasInitialLimitTunnelProtocols :=
 	hasInitialLimitTunnelProtocols :=
-		controller.protocolSelectionConstraints.initialLimitTunnelProtocolsCandidateCount > 0
+		controller.protocolSelectionConstraints.hasInitialProtocols()
 	tunnelPoolSize := controller.getTunnelPoolSize()
 	tunnelPoolSize := controller.getTunnelPoolSize()
 
 
 	scanCount := 0
 	scanCount := 0