We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c05dee5 commit 668349dCopy full SHA for 668349d
async-ssh2-lite/src/channel.rs
@@ -338,8 +338,20 @@ mod impl_tokio {
338
let sess = this.sess.clone();
339
let inner = &mut this.inner;
340
341
- this.stream
342
- .poll_read_with(cx, || inner.read(buf.filled_mut()).map(|_| {}), &sess)
+ this.stream.poll_read_with(
+ cx,
343
+ || {
344
+ let size = inner.read(buf.initialize_unfilled());
345
+ match size {
346
+ Ok(size) => {
347
+ buf.advance(size);
348
+ Ok(())
349
+ }
350
+ Err(e) => Err(e),
351
352
+ },
353
+ &sess,
354
+ )
355
}
356
357
0 commit comments