Skip to content

Commit

Permalink
FIxed race condition in dev server that causes reload to not work
Browse files Browse the repository at this point in the history
Fixes #1513
  • Loading branch information
mpscholten committed Oct 20, 2022
1 parent ca46919 commit 30d03a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion exe/IHP/IDE/DevServer.hs
Expand Up @@ -151,7 +151,11 @@ handleAction state AssetChanged = do

handleAction state@(AppState { appGHCIState, statusServerState }) HaskellFileChanged = do
case appGHCIState of
AppGHCIModulesLoaded { .. } -> sendGhciCommand process ":r"
AppGHCIModulesLoaded { .. } -> do
-- The app might already have been triggered
-- but the the "Server started" message might not have been received yet
sendGhciCommand process "ClassyPrelude.uninterruptibleCancel app"
sendGhciCommand process ":r"
RunningAppGHCI { .. } -> do
sendGhciCommand process "ClassyPrelude.uninterruptibleCancel app"
sendGhciCommand process ":r"
Expand Down

0 comments on commit 30d03a7

Please sign in to comment.