We can’t trigger events on the code path handling A/V processing because that code path needs to be high performance.
I believe that this stream qualifies for a "bad stream" category. EMS tries to be tolerant about it and only issue a waring. Maybe it is going to recover. Btw, is it recovering from this?
The best workaround I can think of now is to just drop the stream on the floor. When that happens, if the encoder has retry mechanisms, it will simply re-connect and resume streaming. There is a side effect tho: All outgoing streams (push,record,hls,hds,connected players, etc) will be terminated. Depending on the keepAlive flag on those out streams, they will be resumed when the input becomes available again
I will discuss this behaviour with my team and will let you know what will be the resolution