···1010use log::{debug, error};
1111use tokio::sync::{RwLock, broadcast};
12121313+const EMPTY_LOGS_MESSAGE: &[u8] = b"No logs to show. Waiting for project to start...";
1414+1315impl LuminaryEngine {
1416 /// Creates a stream of [Bytes] for clients to subscribe to.
1517 pub async fn logs_subscribe<'a>(&'_ self, project: String) -> BoxStream<'a, Bytes> {
···2729 {
2830 // Send previous logs in buffer to bring client up to date
2931 let bytes = &buffer.read().await;
3030- if bytes.is_empty() {
3131- yield b"Nothing yet...".as_slice().into();
3232- } else {
3232+ if !bytes.is_empty() {
3333 yield <BytesMut as Clone>::clone(&bytes).freeze()
3434- }
3434+ }
3535 }
36363737 let mut receiver = channel.subscribe();
···90909191 // If the process exits, wait for an event from the project before triggering a retry
9292 debug!("Docker compose logs process exited, waiting for event to trigger retry...");
9393+9494+ // Send a message to clients if there are no logs to show
9595+ {
9696+ let mut buffer = buffer.write().await;
9797+ if buffer.is_empty() {
9898+ buffer.extend_from_slice(EMPTY_LOGS_MESSAGE);
9999+ let _ = channel.send(Bytes::from(EMPTY_LOGS_MESSAGE));
100100+ }
101101+ }
9310294103 loop {
95104 match this