mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 17:40:47 +03:00
Fix fetching inexistent batch tokens
This commit is contained in:
parent
c9de044e32
commit
600df6d2ec
1 changed files with 5 additions and 2 deletions
|
@ -687,11 +687,14 @@ Cache::nextBatchToken() const
|
|||
auto txn = lmdb::txn::begin(env_, nullptr, MDB_RDONLY);
|
||||
lmdb::val token;
|
||||
|
||||
lmdb::dbi_get(txn, syncStateDb_, NEXT_BATCH_KEY, token);
|
||||
auto result = lmdb::dbi_get(txn, syncStateDb_, NEXT_BATCH_KEY, token);
|
||||
|
||||
txn.commit();
|
||||
|
||||
return std::string(token.data(), token.size());
|
||||
if (result)
|
||||
return std::string(token.data(), token.size());
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue