postage-rs icon indicating copy to clipboard operation
postage-rs copied to clipboard

FilterStream needs some kind of backoff/sleep

Open austinjones opened this issue 3 years ago • 0 comments

The FilterStream currently loops on Ready values, until a match is found. It's possible to write a malicious stream and filter that would infinitely loop:

filter = |v| false;
stream = ready(1)

This stream would never return Pending, which results in a FilterStream that loops.

austinjones avatar Jan 18 '21 05:01 austinjones