aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config/production.yaml.example2
-rw-r--r--server/lib/live/live-manager.ts15
2 files changed, 14 insertions, 3 deletions
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 0993eb9f2..4dc5c281d 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -386,7 +386,9 @@ live:
386 rtmps: 386 rtmps:
387 enabled: false 387 enabled: false
388 port: 1936 388 port: 1936
389 # Absolute path
389 key_file: '' 390 key_file: ''
391 # Absolute path
390 cert_file: '' 392 cert_file: ''
391 393
392 # Allow to transcode the live streaming in multiple live resolutions 394 # Allow to transcode the live streaming in multiple live resolutions
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) => {