I'm a programming novice, but I looked through node_rtmp_session.js
It appears that this.bitrate is updated in the rtmpChunkRead function, which is called during the onSocketData function. My guess is that since no data is arriving at the server, onSocketData isn't called, and this.bitrate isn't updating. I'm not sure what exact fix is needed though to ensure rtmpChunkRead keeps happening after losing connection.
Hello,
I'm testing disconnection scenarios to NMS.
Ideally, the
bitrate
value seen in http://localhost:8000/api/streams/publish/live from src/api/controllers/streams.js should change to 0 when no data is received by the server. However, the bitrate value remains the last known bitrate value before disconnection.I'm a programming novice, but I looked through node_rtmp_session.js It appears that
this.bitrate
is updated in thertmpChunkRead
function, which is called during theonSocketData
function. My guess is that since no data is arriving at the server,onSocketData
isn't called, andthis.bitrate
isn't updating. I'm not sure what exact fix is needed though to ensurertmpChunkRead
keeps happening after losing connection.