fix: upgrade hasql-notifications to show error

This commit is contained in:
steve-chavez
2024-03-13 11:14:11 -05:00
committed by Steve Chavez
parent 00f5780415
commit 86e15dbb77
4 changed files with 25 additions and 13 deletions
+2 -2
View File
@@ -492,11 +492,11 @@ listener appState observer = do
exitFailure
where
handleFinally dbChannel False err = do
observer $ DBListenerFailNoRecoverObs dbChannel err
observer $ DBListenerFailRecoverObs False dbChannel err
killThread (getMainThreadId appState)
handleFinally dbChannel True err = do
-- if the thread dies, we try to recover
observer $ DBListenerFailRecoverObs dbChannel err
observer $ DBListenerFailRecoverObs True dbChannel err
putIsListenerOn appState False
-- assume the pool connection was also lost, call the connection worker
connectionWorker appState