mirror of
https://github.com/koush/scrypted.git
synced 2026-03-02 01:02:57 +00:00
rebroadcast: fix inactivity grace period
This commit is contained in:
@@ -61,6 +61,7 @@ class PrebufferSession {
|
||||
storage: Storage;
|
||||
|
||||
activeClients = 0;
|
||||
inactivityTimeout: NodeJS.Timeout;
|
||||
|
||||
AUDIO_CONFIGURATION = AUDIO_CONFIGURATION_TEMPLATE + '-' + this.streamId;
|
||||
|
||||
@@ -380,7 +381,8 @@ class PrebufferSession {
|
||||
if (this.activeClients)
|
||||
return;
|
||||
|
||||
setTimeout(() => {
|
||||
clearTimeout(this.inactivityTimeout)
|
||||
this.inactivityTimeout = setTimeout(() => {
|
||||
if (this.activeClients)
|
||||
return;
|
||||
this.console.log(this.streamName, 'terminating rebroadcast due to inactivity');
|
||||
|
||||
Reference in New Issue
Block a user