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:
|
rtmps:
|
||||||
enabled: false
|
enabled: false
|
||||||
port: 1936
|
port: 1936
|
||||||
|
# Absolute path
|
||||||
key_file: ''
|
key_file: ''
|
||||||
|
# Absolute path
|
||||||
cert_file: ''
|
cert_file: ''
|
||||||
|
|
||||||
# Allow to transcode the live streaming in multiple live resolutions
|
# Allow to transcode the live streaming in multiple live resolutions
|
||||||
|
|
|
@ -150,10 +150,19 @@ class LiveManager {
|
||||||
stop () {
|
stop () {
|
||||||
this.running = false
|
this.running = false
|
||||||
|
|
||||||
|
if (this.rtmpServer) {
|
||||||
logger.info('Stopping RTMP server.', lTags())
|
logger.info('Stopping RTMP server.', lTags())
|
||||||
|
|
||||||
this.rtmpServer.close()
|
this.rtmpServer.close()
|
||||||
this.rtmpServer = undefined
|
this.rtmpServer = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.rtmpsServer) {
|
||||||
|
logger.info('Stopping RTMPS server.', lTags())
|
||||||
|
|
||||||
|
this.rtmpsServer.close()
|
||||||
|
this.rtmpsServer = undefined
|
||||||
|
}
|
||||||
|
|
||||||
// Sessions is an object
|
// Sessions is an object
|
||||||
this.getContext().sessions.forEach((session: any) => {
|
this.getContext().sessions.forEach((session: any) => {
|
||||||
|
|
Loading…
Reference in a new issue