Răsfoiți Sursa

Fix: impaired protocol disabling skipped too soon

Rod Hynes 10 ani în urmă
părinte
comite
407679aa98
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      psiphon/controller.go

+ 2 - 2
psiphon/controller.go

@@ -772,7 +772,7 @@ func (controller *Controller) establishCandidateGenerator(impairedProtocols []st
 
 
 loop:
 loop:
 	// Repeat until stopped
 	// Repeat until stopped
-	for {
+	for i := 0; ; i++ {
 
 
 		if !WaitForNetworkConnectivity(
 		if !WaitForNetworkConnectivity(
 			controller.config.NetworkConnectivityChecker,
 			controller.config.NetworkConnectivityChecker,
@@ -783,7 +783,7 @@ loop:
 
 
 		// Send each iterator server entry to the establish workers
 		// Send each iterator server entry to the establish workers
 		startTime := time.Now()
 		startTime := time.Now()
-		for i := 0; ; i++ {
+		for {
 			serverEntry, err := iterator.Next()
 			serverEntry, err := iterator.Next()
 			if err != nil {
 			if err != nil {
 				NoticeAlert("failed to get next candidate: %s", err)
 				NoticeAlert("failed to get next candidate: %s", err)