1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 14:30:36 +02:00

Framed::poll_ready flushes when buffer is full (#409)

This commit is contained in:
brockelmore
2021-11-04 19:43:33 -05:00
committed by GitHub
parent b2cef8fcdb
commit 2080f4c149
4 changed files with 226 additions and 2 deletions

View File

@ -300,11 +300,11 @@ where
{
type Error = U::Error;
fn poll_ready(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
if self.is_write_ready() {
Poll::Ready(Ok(()))
} else {
Poll::Pending
self.flush(cx)
}
}