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:
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user