소스 검색

- fixed interval initialization

ksawk 8 년 전
부모
커밋
0fdce6ce6f
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      index.js

+ 3 - 3
index.js

@@ -305,7 +305,6 @@ app.use(function(req, res, next){
 });
 
 var onInit = function () {
-  if(engine.configMenager.config.updateState){
   updateInterval
     .setInterval(engine.configMenager.config.updateInterval)
     .setFunction(function () {
@@ -322,8 +321,9 @@ var onInit = function () {
         }, function (err, map) {
         });
       });
-    })
-    .start();
+    });
+  if(engine.configMenager.config.updateState){
+    updateInterval.start();
   }
 };