actix
actix copied to clipboard
fix: Forward `poll_ready()` errors to the actor and possibly finish
PR Type
Bug Fix
PR Checklist
Check your PR fulfills the following:
- [ ] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.
- [ ] A changelog entry has been made for the appropriate packages.
- [x] Format code with the latest stable rustfmt
Overview
It's not generally supported to poll a Sink again after it returned an error anywhere, and e.g. SinkMapErr from the futures crate is simply panicking if this happens.
cc @gdesmott
Could you contrive a test that would fail on master ?
Yes, if this approach makes sense and you don't want to solve the underlying problem (which AFAICS requires breaking API changes)
To make progress, this PR needs a test and a changelog entry.