You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If min_bytes_per_second is non-zero and a transfer is making forward progress but more slowly than required, the stream should error out as expected, however, as poll_read is only expected to be called when more data is available (or the future has otherwise been woken up), if a transfer stalls out completely, nothing will currently wake up the reader for it to detect the stall and produce an error.
It looks like it will need to setup a timer on every call to poll_read that is associated with the Context, but I don't think there is an async cross platform timer crate we could use here yet.
There is also the larger topic of how to test this type without having tests that run longer than 30 seconds (the minimum amount of time before SafeReader enforces a minimum transfer rate) that would be useful to solve too.
The text was updated successfully, but these errors were encountered:
If min_bytes_per_second is non-zero and a transfer is making forward progress but more slowly than required, the stream should error out as expected, however, as poll_read is only expected to be called when more data is available (or the future has otherwise been woken up), if a transfer stalls out completely, nothing will currently wake up the reader for it to detect the stall and produce an error.
It looks like it will need to setup a timer on every call to poll_read that is associated with the Context, but I don't think there is an async cross platform timer crate we could use here yet.
There is also the larger topic of how to test this type without having tests that run longer than 30 seconds (the minimum amount of time before SafeReader enforces a minimum transfer rate) that would be useful to solve too.
The text was updated successfully, but these errors were encountered: