Removed Channel Backups error

This commit is contained in:
emad-salah 2020-08-12 15:07:57 +01:00
parent de08e08d98
commit 4008493ab2

View file

@ -582,13 +582,15 @@ module.exports = async (
logger.error('Channel backup stream error:', err)
})
stream.on('status', status => {
logger.error('Channel backup stream status:', status)
if (status.code === 14) {
// Prevents call stack overflow exceptions
process.nextTick(onNewChannelBackup)
process.nextTick(() => setTimeout(onNewChannelBackup, 30000))
} else {
logger.error('Channel backup stream status:', status)
}
})
}
onNewChannelBackup()
// Generate auth token and send it as a JSON response