Keep idle streams from closing connections
Some checks failed
CI / checks (push) Failing after 7m16s
Some checks failed
CI / checks (push) Failing after 7m16s
This commit is contained in:
parent
8da4bc57ba
commit
c3fe269dc6
2 changed files with 1 additions and 8 deletions
|
|
@ -973,8 +973,7 @@ impl Receiver {
|
||||||
return Err(CommunicationError::StreamError);
|
return Err(CommunicationError::StreamError);
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
warn!("[Receiver] length-prefix read timed out");
|
return Ok(ReceivedFrame::Idle);
|
||||||
return Err(CommunicationError::StreamError);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -290,12 +290,6 @@ impl<C: TransportConnection> GenericReceiver<C> {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
tracing::warn!(
|
|
||||||
"MTP receive stream timed out while reading frame header"
|
|
||||||
);
|
|
||||||
let _ = tx.send(Err(CommunicationError::StreamError)).await;
|
|
||||||
connection
|
|
||||||
.close(policy.application_close_code, b"frame header timeout");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue