fix(idm): reimplement packet processing algorithm (#330)

* chore(xen): rewrite event channel code

* fix(idm): repair idm bugs on the file backend
This commit is contained in:
Alex Zenla
2024-08-13 16:18:27 -07:00
committed by GitHub
parent ffc9dcc0ea
commit 1cf03a460e
16 changed files with 273 additions and 171 deletions

View File

@ -254,9 +254,9 @@ pub struct IdmDaemonBackend {
#[async_trait::async_trait]
impl IdmBackend for IdmDaemonBackend {
async fn recv(&mut self) -> Result<IdmTransportPacket> {
async fn recv(&mut self) -> Result<Vec<IdmTransportPacket>> {
if let Some(packet) = self.rx_receiver.recv().await {
Ok(packet)
Ok(vec![packet])
} else {
Err(anyhow!("idm receive channel closed"))
}