From b82d9e8446058fa38a160691ed74726dd9625ced Mon Sep 17 00:00:00 2001 From: ggrieco-tob Date: Fri, 20 Oct 2023 15:31:11 +0200 Subject: [PATCH] deliver only events instead of status lines --- lib/Echidna/UI.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Echidna/UI.hs b/lib/Echidna/UI.hs index 1edc6af3a..b384d2b10 100644 --- a/lib/Echidna/UI.hs +++ b/lib/Echidna/UI.hs @@ -177,11 +177,11 @@ ui vm world dict initialCorpus = do putStrLn $ time <> "[status] " <> line hFlush stdout + sseChan <- dupChan env.eventQueue + let streamStatus = do - states <- liftIO $ workerStates workers - time <- timePrefix <$> getTimestamp - line <- statusLine env states - return $ ServerEvent { eventName = Nothing, eventId = Nothing, eventData = [ putStringUtf8 line ]} + (_, _, event) <- readChan sseChan + return $ ServerEvent { eventName = Nothing, eventId = Nothing, eventData = [ putStringUtf8 $ show event ]} server <- liftIO . forkIO $ do run 3413 $ eventSourceAppIO streamStatus