Преглед изворни кода

Prevent autocompile loop

If an autocompile hits a rate limit, it would get into a bad state where
it would continuely loop making compile requests. This is because the
compile response resolving would disable auto compile (because the rate
limit was hit) but also trigger calculation of uncompiled changes, which
would not check if autocompile was disabled. The fix is to just check if
autocompile is disabled.
Alasdair Smith пре 8 година
родитељ
комит
9dd965da3c
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

+ 3 - 0
services/web/public/coffee/ide/pdf/controllers/PdfController.coffee

@@ -125,6 +125,9 @@ define [
 
 
 		$scope.uncompiledChanges = false
 		$scope.uncompiledChanges = false
 		recalculateUncompiledChanges = () ->
 		recalculateUncompiledChanges = () ->
+			if !$scope.autocompile_enabled
+				# Auto-compile was disabled
+				$scope.uncompiledChanges = false
 			if $scope.ui.pdfHidden
 			if $scope.ui.pdfHidden
 				# Don't bother auto-compiling if pdf isn't visible
 				# Don't bother auto-compiling if pdf isn't visible
 				$scope.uncompiledChanges = false
 				$scope.uncompiledChanges = false