From 3a04d7f0ab138f8dce088deda299004cea70e101 Mon Sep 17 00:00:00 2001 From: Sergey Ivanov Date: Wed, 16 Aug 2023 16:54:45 +0400 Subject: [PATCH] use native Exception.handle to respawn --- hbs2-peer/app/PeerMain.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbs2-peer/app/PeerMain.hs b/hbs2-peer/app/PeerMain.hs index df01d834..ea95eb54 100644 --- a/hbs2-peer/app/PeerMain.hs +++ b/hbs2-peer/app/PeerMain.hs @@ -449,7 +449,7 @@ runPeer :: forall e s . ( e ~ L4Proto , HasStorage (PeerM e IO) ) => PeerOpts -> IO () -runPeer opts = U.handle (\e -> myException e +runPeer opts = Exception.handle (\e -> myException e >> performGC >> respawn opts ) $ runResourceT do