closeAgentClient async commands clean up (#523)

This commit is contained in:
JRoberts authored and GitHub committed 2022-09-12 18:15:32 +01:00
1 parent 605e6c64c6
commit e328ae5d06
1 file changed
+3
+3
View File
@@ -404,11 +404,14 @@ closeAgentClient c = liftIO $ do
cancelActions $ reconnections c
cancelActions $ asyncClients c
cancelActions $ smpQueueMsgDeliveries c
cancelActions $ asyncCmdProcesses c
atomically . TM2.clear $ activeSubs c
atomically . TM2.clear $ pendingSubs c
clear subscrConns
clear connMsgsQueued
clear smpQueueMsgQueues
clear connCmdsQueued
clear asyncCmdQueues
clear getMsgLocks
where
clear :: Monoid m => (AgentClient -> TVar m) -> IO ()