versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.18k stars 1.12k forks source link

fix: panic with normal errors in Rust #1377

Closed satoren closed 5 months ago

satoren commented 5 months ago

Returns an error when an error can be returned

satoren commented 5 months ago

It is defined as a RequestError. Seems to be returning it except here. The type is also Result<ConsumerStats, RequestError>.

https://github.com/versatica/mediasoup/blob/d534be0cf3a90a7199435deb601dba73401bd767/rust/src/worker.rs#L46

nazar-pc commented 5 months ago

IIRC ConsumerGetStatsRequest never errors, it is just ignored if consumer doesn't exist. No strong opinion though.

ibc commented 5 months ago

So should we merge or not?

satoren commented 5 months ago

I have encountered the L1042 panic, but I don't know up to the exact cause because there is no other information available.

Maybe it is an error that the "Channel already closed".