mirror of
https://gitlab.com/jusax23/dnc.git
synced 2024-11-22 14:46:33 +01:00
bug fix
This commit is contained in:
parent
8c3d55dec1
commit
67fdc60026
1 changed files with 8 additions and 10 deletions
18
manager.js
18
manager.js
|
@ -67,16 +67,14 @@ const manager = function(process){
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
t.saveShutdown = function(){
|
t.saveShutdown = function(){
|
||||||
return new Promise((res,rej)=>{
|
t.shutdown().then(() => {
|
||||||
t.shutdown().then(()=>{
|
setTimeout(function() { //some save time
|
||||||
setTimeout(function() { //some save time
|
process.exit();
|
||||||
process.exit();
|
}, 1000);
|
||||||
}, 1000);
|
}).catch(() => {
|
||||||
}).catch(()=>{
|
setTimeout(function() { //shutdown on error with more save time
|
||||||
setTimeout(function() { //shutdown on error with more save time
|
process.exit();
|
||||||
process.exit();
|
}, 10000);
|
||||||
}, 10000);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue