diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-30 17:03:13 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-30 17:03:13 +0100 |
commit | 8c666c44ab3109ce2ad432bf2f98cc0505593543 (patch) | |
tree | 1dad1c4e56d22e1bccdde67998f8322255117050 /server/lib/live-manager.ts | |
parent | a742b4b0e215f49928f7389d09de1023414fbeff (diff) | |
download | PeerTube-8c666c44ab3109ce2ad432bf2f98cc0505593543.tar.gz PeerTube-8c666c44ab3109ce2ad432bf2f98cc0505593543.tar.zst PeerTube-8c666c44ab3109ce2ad432bf2f98cc0505593543.zip |
Fix live saving after a server restart
Diffstat (limited to 'server/lib/live-manager.ts')
-rw-r--r-- | server/lib/live-manager.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/lib/live-manager.ts b/server/lib/live-manager.ts index 690e2ce55..4f45ce530 100644 --- a/server/lib/live-manager.ts +++ b/server/lib/live-manager.ts | |||
@@ -378,13 +378,13 @@ class LiveManager { | |||
378 | // Wait latest segments generation, and close watchers | 378 | // Wait latest segments generation, and close watchers |
379 | 379 | ||
380 | Promise.all([ tsWatcher.close(), masterWatcher.close() ]) | 380 | Promise.all([ tsWatcher.close(), masterWatcher.close() ]) |
381 | .then(() => { | 381 | .then(() => { |
382 | // Process remaining segments hash | 382 | // Process remaining segments hash |
383 | for (const key of Object.keys(segmentsToProcessPerPlaylist)) { | 383 | for (const key of Object.keys(segmentsToProcessPerPlaylist)) { |
384 | processSegments(segmentsToProcessPerPlaylist[key]) | 384 | processSegments(segmentsToProcessPerPlaylist[key]) |
385 | } | 385 | } |
386 | }) | 386 | }) |
387 | .catch(err => logger.error('Cannot close watchers of %s or process remaining hash segments.', outPath, { err })) | 387 | .catch(err => logger.error('Cannot close watchers of %s or process remaining hash segments.', outPath, { err })) |
388 | 388 | ||
389 | this.onEndTransmuxing(videoLive.Video.id) | 389 | this.onEndTransmuxing(videoLive.Video.id) |
390 | .catch(err => logger.error('Error in closed transmuxing.', { err })) | 390 | .catch(err => logger.error('Error in closed transmuxing.', { err })) |