Load sessions lazily from db
This commit is contained in:
parent
37b971adb2
commit
c24f9a22a5
6 changed files with 42 additions and 33 deletions
|
|
@ -55,13 +55,11 @@ from_json(const nlohmann::json &obj, MegolmSessionIndex &msg);
|
|||
struct OlmSessionStorage
|
||||
{
|
||||
// Megolm sessions
|
||||
std::map<std::string, mtx::crypto::InboundGroupSessionPtr> group_inbound_sessions;
|
||||
std::map<std::string, mtx::crypto::OutboundGroupSessionPtr> group_outbound_sessions;
|
||||
std::map<std::string, OutboundGroupSessionData> group_outbound_session_data;
|
||||
|
||||
// Guards for accessing megolm sessions.
|
||||
std::mutex group_outbound_mtx;
|
||||
std::mutex group_inbound_mtx;
|
||||
};
|
||||
|
||||
struct StoredOlmSession
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue