Skip to content

Commit

Permalink
deliver only events instead of status lines
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrieco-tob authored and arcz committed Nov 2, 2023
1 parent 8e5089f commit fcff1cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Echidna/UI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,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
Expand Down

0 comments on commit fcff1cc

Please sign in to comment.