Open VigibotDev opened 6 years ago
This bug appear when a server side video is re-started without any client. You write the header only if there is wsServer.clients.length > 0.
I just moved the "if (headers.length < 3) headers.push(data)" outside the "if (wsServer && wsServer.clients.length > 0) {"
(root|/var/www) git diff diff --git a/visio/serveur.js b/visio/serveur.js index 1016c87..2fb3cb9 100644 --- a/visio/serveur.js +++ b/visio/serveur.js @@ -50,8 +50,8 @@ if (conf.get('tcpport')) { headers = [] const NALSplitter = new Split(NALSeparator) NALSplitter.on('data', (data) => { + if (headers.length < 3) headers.push(data) if (wsServer && wsServer.clients.length > 0) { - if (headers.length < 3) headers.push(data) broadcast(data) } }).on('error', (e) => {
I forked your repo I can do commits + pull request if you want.
This bug appear when a server side video is re-started without any client. You write the header only if there is wsServer.clients.length > 0.
I just moved the "if (headers.length < 3) headers.push(data)" outside the "if (wsServer && wsServer.clients.length > 0) {"
I forked your repo I can do commits + pull request if you want.