Fix simultaneous read history requests.

This commit is contained in:
John Preston 2020-02-21 19:05:57 +04:00
parent d83cf0e560
commit c207a7c0d3

View File

@ -388,7 +388,7 @@ void Histories::sendReadRequests() {
const auto now = crl::now();
auto next = std::optional<crl::time>();
for (auto &[history, state] : _states) {
if (!state.readTill) {
if (!state.readTill || state.readWhen == kReadRequestSent) {
continue;
} else if (state.readWhen <= now) {
sendReadRequest(history, state);