Browse Source

fix a bug which causes updates to be tried without delay after the first update interval

Alan Shreve 12 years ago
parent
commit
4d08291813
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/ngrok/client/update_release.go

+ 3 - 2
src/ngrok/client/update_release.go

@@ -118,8 +118,9 @@ func autoUpdate(s *State, ctl *ui.Controller, token string) {
 	// try to update immediately and then at a set interval
 	update()
 	for _ = range time.Tick(updateCheckInterval) {
-		for tryAgain {
-			update()
+		if !tryAgain {
+			break
 		}
+		update()
 	}
 }