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

Fix: connectedReporter failed to send additional reports

Rod Hynes 3 лет назад
Родитель
Сommit
762c4d261d
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      psiphon/controller.go

+ 7 - 7
psiphon/controller.go

@@ -733,16 +733,16 @@ func (controller *Controller) connectedReporter() {
 		return
 	}
 
+	select {
+	case <-controller.signalReportConnected:
+		// Make the initial connected request
+	case <-controller.runCtx.Done():
+		return
+	}
+
 loop:
 	for {
 
-		select {
-		case <-controller.signalReportConnected:
-			// Make the initial connected request
-		case <-controller.runCtx.Done():
-			break loop
-		}
-
 		// Pick any active tunnel and make the next connected request. No error is
 		// logged if there's no active tunnel, as that's not an unexpected
 		// condition.