diff --git a/server/app/scripts/controllers/sync.js b/server/app/scripts/controllers/sync.js index c4e927ed4..c6f9815dd 100644 --- a/server/app/scripts/controllers/sync.js +++ b/server/app/scripts/controllers/sync.js @@ -1,10 +1,10 @@ 'use strict'; angular.module('app').controller("SyncController", function($scope, $http, $interval, $location, users) { - $interval(function() { + var stop = $interval(function() { // todo(bradrydzewski) We should poll the user to see - // if the sync process is complete. If no, we should - // repeat. + // if the sync process is complete. + $interval.cancel(stop); $location.path("/"); }, 5000); });