mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-04 05:17:39 +03:00
fix write for openssl filter
This commit is contained in:
parent
bb45502886
commit
deaa2656ff
3 changed files with 23 additions and 19 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue