diff --git a/IHP/PGListener.hs b/IHP/PGListener.hs index b15a627e0..7656f7acc 100644 --- a/IHP/PGListener.hs +++ b/IHP/PGListener.hs @@ -164,6 +164,7 @@ unsubscribe subscription@(Subscription { .. }) pgListener = do deleteById :: [Subscription] -> [Subscription] deleteById = List.deleteBy (\a b -> get #id a == get #id b) subscription modifyIORef' (get #subscriptions pgListener) (HashMap.adjust deleteById channel) + uninterruptibleCancel reader pure () -- | Runs a @LISTEN ..;@ statements on the postgres connection, if not already listening on that channel