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.ts15
1 files changed, 12 insertions, 3 deletions
diff --git a/server/lib/live/live-manager.ts b/server/lib/live/live-manager.ts
index c75cc3bda..1b7b9dd4d 100644
--- a/server/lib/live/live-manager.ts
+++ b/server/lib/live/live-manager.ts
@@ -150,10 +150,19 @@ class LiveManager {
150 stop () { 150 stop () {
151 this.running = false 151 this.running = false
152 152
153 logger.info('Stopping RTMP server.', lTags()) 153 if (this.rtmpServer) {
154 logger.info('Stopping RTMP server.', lTags())
154 155
155 this.rtmpServer.close() 156 this.rtmpServer.close()
156 this.rtmpServer = undefined 157 this.rtmpServer = undefined
158 }
159
160 if (this.rtmpsServer) {
161 logger.info('Stopping RTMPS server.', lTags())
162
163 this.rtmpsServer.close()
164 this.rtmpsServer = undefined
165 }
157 166
158 // Sessions is an object 167 // Sessions is an object
159 this.getContext().sessions.forEach((session: any) => { 168 this.getContext().sessions.forEach((session: any) => {