From 229e2607d76f3d6baf0d2623b186c084e3908b8f Mon Sep 17 00:00:00 2001 From: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com> Date: Mon, 14 Feb 2022 21:00:14 +0400 Subject: [PATCH] remove redundant asynchronous connection code (#317) --- src/Simplex/Messaging/Agent.hs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/Simplex/Messaging/Agent.hs b/src/Simplex/Messaging/Agent.hs index 41d9a073f..8f28adda5 100644 --- a/src/Simplex/Messaging/Agent.hs +++ b/src/Simplex/Messaging/Agent.hs @@ -305,16 +305,6 @@ subscribeConnection' c connId = SomeConn _ (DuplexConnection _ rq sq) -> do resumeMsgDelivery c connId sq subscribeQueue c rq connId - case status (sq :: SndQueue) of - Confirmed -> do - -- TODO if there is no confirmation saved, just update the status without securing the queue - AcceptedConfirmation {senderConf = SMPConfirmation {senderKey}} <- - withStore (`getAcceptedConfirmation` connId) - secureQueue c rq senderKey - withStore $ \st -> setRcvQueueStatus st rq Secured - Secured -> pure () - Active -> pure () - _ -> throwError $ INTERNAL "unexpected queue status" SomeConn _ (SndConnection _ sq) -> do resumeMsgDelivery c connId sq case status (sq :: SndQueue) of