Merge pull request #107 from shocknet/fix/ch-backups-overflow
backups fix
This commit is contained in:
commit
8fe8d4f040
1 changed files with 5 additions and 2 deletions
|
|
@ -517,7 +517,8 @@ module.exports = async (
|
||||||
})
|
})
|
||||||
stream.on("end", ()=>{
|
stream.on("end", ()=>{
|
||||||
logger.info("Channel backup stream ended, starting a new one...")
|
logger.info("Channel backup stream ended, starting a new one...")
|
||||||
onNewChannelBackup()
|
// Prevents call stack overflow exceptions
|
||||||
|
process.nextTick(onNewChannelBackup)
|
||||||
})
|
})
|
||||||
stream.on("error", err => {
|
stream.on("error", err => {
|
||||||
logger.error("Channel backup stream error:", err);
|
logger.error("Channel backup stream error:", err);
|
||||||
|
|
@ -525,7 +526,9 @@ module.exports = async (
|
||||||
stream.on("status", status => {
|
stream.on("status", status => {
|
||||||
logger.error("Channel backup stream status:", status);
|
logger.error("Channel backup stream status:", status);
|
||||||
if (status.code === 14) {
|
if (status.code === 14) {
|
||||||
onNewChannelBackup();
|
// Prevents call stack overflow exceptions
|
||||||
|
process.nextTick(onNewChannelBackup)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue