Correctly close RTMPS server too
This commit is contained in:
parent
df1db951c5
commit
5037e0e474
2 changed files with 14 additions and 3 deletions
|
@ -386,7 +386,9 @@ live:
|
|||
rtmps:
|
||||
enabled: false
|
||||
port: 1936
|
||||
# Absolute path
|
||||
key_file: ''
|
||||
# Absolute path
|
||||
cert_file: ''
|
||||
|
||||
# Allow to transcode the live streaming in multiple live resolutions
|
||||
|
|
|
@ -150,10 +150,19 @@ class LiveManager {
|
|||
stop () {
|
||||
this.running = false
|
||||
|
||||
logger.info('Stopping RTMP server.', lTags())
|
||||
if (this.rtmpServer) {
|
||||
logger.info('Stopping RTMP server.', lTags())
|
||||
|
||||
this.rtmpServer.close()
|
||||
this.rtmpServer = undefined
|
||||
this.rtmpServer.close()
|
||||
this.rtmpServer = undefined
|
||||
}
|
||||
|
||||
if (this.rtmpsServer) {
|
||||
logger.info('Stopping RTMPS server.', lTags())
|
||||
|
||||
this.rtmpsServer.close()
|
||||
this.rtmpsServer = undefined
|
||||
}
|
||||
|
||||
// Sessions is an object
|
||||
this.getContext().sessions.forEach((session: any) => {
|
||||
|
|
Loading…
Reference in a new issue