Closed bobzilladev closed 11 months ago
It looks like if there's a remainder in the incoming
it is writing to the poll_read buffer, but then delegating the return to the inner.poll_read which is Pending
, so copy_bidirectional
doesn't copy the remainder over to the outgoing stream. If it always returns Ready
after a remainder is copied in, then things work as normal.
the caller will make sure to call your poll method again for you
Looking through copy_bidirectional
happened to see that if they get a Pending on write they still try to read some more for a larger write later, was nice to see.
If an inbound request is too small, no
poll_write
is issued to the outbound proxy stream bycopy_bidirectional
, so the data is never written to the inner stream. This adds returnsReady
from remainder copying without condition, which resolves issue in anngrok-python
proxy test.