remote config for making CDSI lookups via libsignal

This commit is contained in:
Sergey Skrobotov 2024-03-27 15:56:43 -07:00 committed by GitHub
parent bcf12e20c4
commit cf02337d6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 1 deletions

View file

@ -359,7 +359,7 @@ export class WebSocketResourceWithShadowing implements IWebSocketResource {
private updateStats(name: string) {
const storedStats = AggregatedStats.loadOrCreateEmpty(name);
const updatedStats = AggregatedStats.add(storedStats, this.stats);
let updatedStats = AggregatedStats.add(storedStats, this.stats);
if (
this.shadowingWithReporting &&
AggregatedStats.shouldReportError(updatedStats) &&
@ -368,6 +368,11 @@ export class WebSocketResourceWithShadowing implements IWebSocketResource {
window.reduxActions.toast.showToast({
toastType: ToastType.TransportError,
});
log.warn(
`${this.logId}: experimental transport toast displayed, flushing transport statistics before resetting`,
updatedStats
);
updatedStats = AggregatedStats.createEmpty();
updatedStats.lastToastTimestamp = Date.now();
}
AggregatedStats.store(updatedStats, name);