mirror of https://github.com/procxx/kepka.git
Fix simultaneous read history requests.
This commit is contained in:
parent
d83cf0e560
commit
c207a7c0d3
|
@ -388,7 +388,7 @@ void Histories::sendReadRequests() {
|
||||||
const auto now = crl::now();
|
const auto now = crl::now();
|
||||||
auto next = std::optional<crl::time>();
|
auto next = std::optional<crl::time>();
|
||||||
for (auto &[history, state] : _states) {
|
for (auto &[history, state] : _states) {
|
||||||
if (!state.readTill) {
|
if (!state.readTill || state.readWhen == kReadRequestSent) {
|
||||||
continue;
|
continue;
|
||||||
} else if (state.readWhen <= now) {
|
} else if (state.readWhen <= now) {
|
||||||
sendReadRequest(history, state);
|
sendReadRequest(history, state);
|
||||||
|
|
Loading…
Reference in New Issue