2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 16:05:57 +00:00

Destory stats sessions after a timeout.

This commit is contained in:
John Preston
2023-11-11 21:20:09 +04:00
parent 1e6cf839e2
commit 9324ceeb24
8 changed files with 199 additions and 62 deletions

View File

@@ -4537,8 +4537,12 @@ MTP::DcId Session::statsDcId(not_null<ChannelData*> channel) {
return (it == end(_channelStatsDcIds)) ? MTP::DcId(0) : it->second;
}
void Session::applyStatsDcId(not_null<ChannelData*> channel, MTP::DcId dcId) {
_channelStatsDcIds[channel] = dcId;
void Session::applyStatsDcId(
not_null<ChannelData*> channel,
MTP::DcId dcId) {
if (dcId != channel->session().mainDcId()) {
_channelStatsDcIds[channel] = dcId;
}
}
void Session::webViewResultSent(WebViewResultSent &&sent) {