diff --git a/src/data.rs b/src/data.rs index c239618..eddacca 100644 --- a/src/data.rs +++ b/src/data.rs @@ -207,7 +207,9 @@ impl BrainData { mut req: grpc::NewVmRequest, tx: OneshotSender, ) { - req.uuid = uuid::Uuid::new_v4().to_string(); + let uuid = uuid::Uuid::new_v4().to_string(); + + req.uuid = uuid.clone(); info!("Inserting new vm request in memory: {req:?}"); self.tmp_vmrequests .insert(req.uuid.clone(), (req.clone(), tx)); @@ -223,6 +225,14 @@ impl BrainData { "Daemon {} RX dropped before sending update. Cleaning memory...", req.node_pubkey ); + self.submit_vmconfirmation(grpc::NewVmConfirmation { + error: "Daemon is offline.".to_string(), + uuid, + exposed_ports: Vec::new(), + public_ipv4: "".to_string(), + public_ipv6: "".to_string(), + }) + .await; } } }