define all server intervals in a map so we can easily clear them all
This commit is contained in:
@@ -15,11 +15,20 @@ var getActiveSessions = function (Env, Server, cb) {
|
||||
};
|
||||
|
||||
var shutdown = function (Env, Server, cb) {
|
||||
return void cb('E_NOT_IMPLEMENTED');
|
||||
//clearInterval(Env.sessionExpirationInterval);
|
||||
// XXX set a flag to prevent incoming database writes
|
||||
// XXX disconnect all users and reject new connections
|
||||
// XXX wait until all pending writes are complete
|
||||
if (true) {
|
||||
return void cb('E_NOT_IMPLEMENTED');
|
||||
}
|
||||
|
||||
// disconnect all users and reject new connections
|
||||
Server.shutdown();
|
||||
|
||||
// stop all intervals that may be running
|
||||
Object.keys(Env.intervals).forEach(function (name) {
|
||||
clearInterval(Env.intervals[name]);
|
||||
});
|
||||
|
||||
// set a flag to prevent incoming database writes
|
||||
// wait until all pending writes are complete
|
||||
// then process.exit(0);
|
||||
// and allow system functionality to restart the server
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user