mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-31 11:40:06 +00:00
add Connection wholesale
This commit is contained in:
+3
-5
@@ -2181,7 +2181,7 @@ processChatCommand' vr = \case
|
||||
Nothing -> "idle"
|
||||
Just Nothing -> "waiting"
|
||||
Just (Just _async) -> "working"
|
||||
conn@Connection {connStatus, createdAt} <-
|
||||
connection <-
|
||||
withStore (\db -> getConnectionEntity db vr user acId) >>= \case
|
||||
RcvDirectMsgConnection {entityConnection} -> pure entityConnection
|
||||
RcvGroupMsgConnection {entityConnection} -> pure entityConnection
|
||||
@@ -2201,9 +2201,7 @@ processChatCommand' vr = \case
|
||||
smpClientStatus,
|
||||
subWorkerStatus,
|
||||
queueStatus = tshow rqStatus,
|
||||
connStatus_ = connStatus,
|
||||
connAuthErrors = (authErrCounter conn, connDisabled conn),
|
||||
createdAt = createdAt
|
||||
connection
|
||||
}
|
||||
DebugLocks -> lift $ do
|
||||
chatLockName <- atomically . tryReadTMVar =<< asks chatLock
|
||||
@@ -7576,4 +7574,4 @@ dummyFileDescr = FileDescr {fileDescrText = "", fileDescrPartNo = 0, fileDescrCo
|
||||
agentDeliveryStatus :: AgentConnId -> (AgentDeliveryStatus -> AgentDeliveryStatus) -> CM' ()
|
||||
agentDeliveryStatus acId f = do
|
||||
ads <- asks agentDeliveryStatuses
|
||||
atomically $ TM.lookup acId ads >>= mapM_ (`modifyTVar'`f)
|
||||
atomically $ TM.lookup acId ads >>= mapM_ (`modifyTVar'` f)
|
||||
|
||||
@@ -786,10 +786,7 @@ data DebugConnectionStatus = DebugConnectionStatus
|
||||
server :: (Text, String), -- what's the server for this connection? -- XXX: reveals private servers and association
|
||||
smpClientStatus :: Text, -- is there an active client for it?
|
||||
subWorkerStatus :: Text, -- a session was recently restarted and tries to resubscribe
|
||||
-- from Connection
|
||||
connStatus_ :: ConnStatus, -- does the protocol permits delivery
|
||||
connAuthErrors :: (Int, Bool), -- number of AUTH errors before connection gets disabled
|
||||
createdAt :: UTCTime
|
||||
connection :: Connection
|
||||
}
|
||||
deriving (Show)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user