mirror of
https://github.com/Spengreb/sync.git
synced 2026-05-14 03:32:06 +00:00
Use Promise.reduce() on shutdown to prevent overloading memory
This commit is contained in:
parent
594a9e17da
commit
0a94da4d13
1 changed files with 1 additions and 1 deletions
|
|
@ -277,7 +277,7 @@ Server.prototype.announce = function (data) {
|
|||
|
||||
Server.prototype.shutdown = function () {
|
||||
Logger.syslog.log("Unloading channels");
|
||||
Promise.map(this.channels, channel => {
|
||||
Promise.reduce(this.channels, (_, channel) => {
|
||||
return channel.saveState().tap(() => {
|
||||
Logger.syslog.log(`Saved /r/${channel.name}`);
|
||||
}).catch(err => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue