fix(upstream): Use sync read for chunk dequeue (#239)

This commit is contained in:
Santiago Carmuega 2023-03-24 02:58:29 +01:00 committed by GitHub
parent 27d29ace30
commit 2f1270f8e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -44,7 +44,7 @@ where
}
pub fn tick(&mut self) -> TickOutcome {
match self.ingress.recv_timeout(Duration::from_millis(500)) {
match self.ingress.recv_timeout(Duration::from_millis(1)) {
Ok((id, payload)) => {
let segment = Segment::new(self.clock, id, payload);

View file

@ -51,7 +51,7 @@ impl multiplexer::agents::Channel for ProtocolChannel {
}
fn dequeue_chunk(&mut self) -> Result<multiplexer::Payload, multiplexer::agents::ChannelError> {
match self.2.recv_or_idle() {
match self.2.recv() {
Ok(msg) => Ok(msg.payload),
Err(error) => {
error!(?error, "dequeue chunk failed");