Skip to content

Commit

Permalink
Fixed PGListener breaking live reload because it's not stopping on ca…
Browse files Browse the repository at this point in the history
…ncel
  • Loading branch information
mpscholten committed Jan 8, 2022
1 parent beb6de9 commit 9e89be1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions IHP/PGListener.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,11 @@ notifyLoop listeningToVar listenToVar subscriptions = do
result <- Exception.try innerLoop
case result of
Left (error :: SomeException) -> do
let ?context = ?modelContext -- Log onto the modelContext logger
Log.info ("PGListener is going to restart, loop failed with exception: " <> displayException error)
case fromException error of
Just (error :: AsyncCancelled) -> throw error
notification -> do
let ?context = ?modelContext -- Log onto the modelContext logger
Log.info ("PGListener is going to restart, loop failed with exception: " <> displayException error)
Right _ -> pure ()


Expand Down

0 comments on commit 9e89be1

Please sign in to comment.