Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberb committed Feb 26, 2024
1 parent 14e73bb commit 9da2707
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions crates/topos-tce-api/src/stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,25 +152,29 @@ impl Stream {

// We currently open the stream, but no other message from the client is getting processed.
// We are using this open connection to communicate `delivered_certificates` to the client.
stream_packet = self.inbound_stream.next() => {
if let Some(stream_packet) = stream_packet {
match stream_packet {
Ok((request_id, _message)) => {
debug!("Received message for stream: {request_id:?}");
}
Err(error) => {
// In case the stream is getting closed from the client side for example
error!("Stream error: {error:?}");
break;
}
Some(stream_packet) = self.inbound_stream.next() => {
match stream_packet {
Ok((request_id, _message)) => {
debug!("Received message for stream: {request_id:?}");
}
} else {
debug!("Stream is closed, exiting");
break;
}
Err(error) => {
// In case the stream is getting closed from the client side for example
error!("Stream error: {error:?}");
break;
}
}
}



// Some(_stream_packet) = self.inbound_stream.next() => {
//
// }

else => break,
}
}

Ok(self.stream_id)
}
}
Expand Down

0 comments on commit 9da2707

Please sign in to comment.