Skip to content

Commit 26cfad5

Browse files
authored
do not use sndSecure when rotating queue (#1213)
1 parent a99ce61 commit 26cfad5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Simplex/Messaging/Agent.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,14 +1565,13 @@ switchConnection' c connId =
15651565
_ -> throwE $ CMD PROHIBITED "switchConnection: not duplex"
15661566

15671567
switchDuplexConnection :: AgentClient -> Connection 'CDuplex -> RcvQueue -> AM ConnectionStats
1568-
switchDuplexConnection c (DuplexConnection cData@ConnData {connId, userId, connAgentVersion} rqs sqs) rq@RcvQueue {server, dbQueueId = DBQueueId dbQueueId, sndId} = do
1568+
switchDuplexConnection c (DuplexConnection cData@ConnData {connId, userId} rqs sqs) rq@RcvQueue {server, dbQueueId = DBQueueId dbQueueId, sndId} = do
15691569
checkRQSwchStatus rq RSSwitchStarted
15701570
clientVRange <- asks $ smpClientVRange . config
15711571
-- try to get the server that is different from all queues, or at least from the primary rcv queue
15721572
srvAuth@(ProtoServerWithAuth srv _) <- getNextServer c userId $ map qServer (L.toList rqs) <> map qServer (L.toList sqs)
15731573
srv' <- if srv == server then getNextServer c userId [server] else pure srvAuth
1574-
let sndSecure = connAgentVersion >= sndAuthKeySMPAgentVersion
1575-
(q, qUri, tSess, sessId) <- newRcvQueue c userId connId srv' clientVRange SMSubscribe sndSecure
1574+
(q, qUri, tSess, sessId) <- newRcvQueue c userId connId srv' clientVRange SMSubscribe False
15761575
let rq' = (q :: NewRcvQueue) {primary = True, dbReplaceQueueId = Just dbQueueId}
15771576
rq'' <- withStore c $ \db -> addConnRcvQueue db connId rq'
15781577
lift $ addNewQueueSubscription c rq'' tSess sessId

0 commit comments

Comments
 (0)