diff options
author | Chocobozzz <me@florianbigard.com> | 2021-11-05 11:40:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-11-05 11:40:49 +0100 |
commit | 5037e0e474044d7fc04092158784395a001e5c25 (patch) | |
tree | 676634e1c2a712362c79f3d198def26da87d6505 /server/lib/live/live-manager.ts | |
parent | df1db951c512a58110171d046ef367789df02733 (diff) | |
download | PeerTube-5037e0e474044d7fc04092158784395a001e5c25.tar.gz PeerTube-5037e0e474044d7fc04092158784395a001e5c25.tar.zst PeerTube-5037e0e474044d7fc04092158784395a001e5c25.zip |
Correctly close RTMPS server too
Diffstat (limited to 'server/lib/live/live-manager.ts')
-rw-r--r-- | server/lib/live/live-manager.ts | 15 |
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) => { |