Fixes the possibility of a spinlock while reading bytes from an async->sync adapter. This case can be observed with long (e.g., 10 hours of silence) videos which seem to be served slower than we would like to parse their headers.
The fix moves most communication to blocking: read calls first parse all messages form the async context in a non-blocking way, then swap to blocking if no bytes are available.
Fixes the possibility of a spinlock while reading bytes from an async->sync adapter. This case can be observed with long (e.g., 10 hours of silence) videos which seem to be served slower than we would like to parse their headers.
The fix moves most communication to blocking:
read
calls first parse all messages form the async context in a non-blocking way, then swap to blocking if no bytes are available.Tested using
cargo make ready
and "examples/serenity/voice" against the URL https://www.youtube.com/watch?v=g4mHPeMGTJM.