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 Jan 4, 2024
1 parent 4dbf55c commit b82d9e8
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 @@ -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
Expand Down

0 comments on commit b82d9e8

Please sign in to comment.