aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/live/live-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/live/live-manager.ts')
-rw-r--r--server/lib/live/live-manager.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts
index d7199cc89..1863c0b0c 100644
--- a/server/lib/live/live-manager.ts
+++ b/server/lib/live/live-manager.ts
@@ -159,7 +159,12 @@ class LiveManager {
159 } 159 }
160 160
161 const muxingSession = this.muxingSessions.get(sessionId) 161 const muxingSession = this.muxingSessions.get(sessionId)
162 if (muxingSession) muxingSession.abort() 162 if (muxingSession) {
163 muxingSession.abort()
164 muxingSession.destroy()
165
166 this.muxingSessions.delete(sessionId)
167 }
163 } 168 }
164 169
165 private async handleSession (sessionId: string, streamPath: string, streamKey: string) { 170 private async handleSession (sessionId: string, streamPath: string, streamKey: string) {
@@ -269,6 +274,8 @@ class LiveManager {
269 muxingSession.on('after-cleanup', ({ videoId }) => { 274 muxingSession.on('after-cleanup', ({ videoId }) => {
270 this.muxingSessions.delete(sessionId) 275 this.muxingSessions.delete(sessionId)
271 276
277 muxingSession.destroy()
278
272 return this.onAfterMuxingCleanup(videoId) 279 return this.onAfterMuxingCleanup(videoId)
273 .catch(err => logger.error('Error in end transmuxing.', { err, ...localLTags })) 280 .catch(err => logger.error('Error in end transmuxing.', { err, ...localLTags }))
274 }) 281 })