fix write for openssl filter

This commit is contained in:
Nikolay Kim 2021-12-28 04:09:14 +06:00
parent bb45502886
commit deaa2656ff
3 changed files with 23 additions and 19 deletions

View file

@ -395,7 +395,7 @@ mod tests {
fn want_read(&self) {}
fn want_shutdown(&self) {}
fn want_shutdown(&self, _: Option<io::Error>) {}
fn query(&self, _: std::any::TypeId) -> Option<Box<dyn std::any::Any>> {
None

View file

@ -292,14 +292,12 @@ pub(super) fn flush_io<T: AsyncRead + AsyncWrite + Unpin>(
let pool = state.memory_pool();
if len != 0 {
// log::trace!("flushing framed transport: {:?} {:?}", buf.len(), buf);
// log::trace!("flushing framed transport: {:?}", buf.len());
let mut written = 0;
while written < len {
match Pin::new(&mut *io).poll_write(cx, &buf[written..]) {
Poll::Pending => {
break;
}
Poll::Pending => break,
Poll::Ready(Ok(n)) => {
if n == 0 {
log::trace!("Disconnected during flush, written {}", written);