Skip to content

Commit

Permalink
Updating Alert Server
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayank Narula committed Nov 10, 2017
1 parent 088e075 commit f88594d
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,8 @@ function updateStateRecordWindow(){

var Now = Date.now();
var Limit = Now + 45*60*1000;

try {
thread
.send(Limit)

thread
.run(function(limit, done, progress) {
var Now = Date.now();

Expand All @@ -253,6 +251,7 @@ function updateStateRecordWindow(){
progress(Now,limit);
}
})
.send(Limit)
.on('progress', function(Now,limit) {

if( Now >= limit ){
Expand Down Expand Up @@ -324,16 +323,6 @@ function updateStateRecordWindow(){
thread = null;
}
});
} catch(e) {
console.log('Exception with thread : ', e.stack());
if(e.code != "ERR_IPC_CHANNEL_CLOSED")
{
if( thread != null ){
thread.kill();
thread = null;
}
}
}

}

Expand Down

0 comments on commit f88594d

Please sign in to comment.