mirror of
https://github.com/TeamPiped/piped-proxy.git
synced 2024-08-14 23:50:45 +00:00
Poll should be pending when there's not enough data to read.
This commit is contained in:
parent
1dbe891119
commit
437ee17508
1 changed files with 2 additions and 2 deletions
|
@ -119,11 +119,11 @@ where
|
||||||
if !this.found_stream && !this.buffer.is_empty() {
|
if !this.found_stream && !this.buffer.is_empty() {
|
||||||
let (segment_type, s1) = match read_variable_integer(&this.buffer, 0) {
|
let (segment_type, s1) = match read_variable_integer(&this.buffer, 0) {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(e) => return Poll::Ready(Some(Err(e))),
|
Err(_) => return Poll::Pending,
|
||||||
};
|
};
|
||||||
let (segment_length, s2) = match read_variable_integer(&this.buffer, s1) {
|
let (segment_length, s2) = match read_variable_integer(&this.buffer, s1) {
|
||||||
Ok(result) => result,
|
Ok(result) => result,
|
||||||
Err(e) => return Poll::Ready(Some(Err(e))),
|
Err(_) => return Poll::Pending,
|
||||||
};
|
};
|
||||||
if segment_type != 21 {
|
if segment_type != 21 {
|
||||||
// Not the stream
|
// Not the stream
|
||||||
|
|
Loading…
Reference in a new issue