Reset MessageReceiver processed count after reporting it

This commit is contained in:
Scott Nonnenberg 2022-05-25 11:15:09 -07:00 committed by GitHub
parent bf6d9c6cda
commit 68f705e6ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 10 deletions

View file

@ -251,8 +251,10 @@ export default class MessageReceiver
});
}
public getProcessedCount(): number {
return this.processedCount;
public getAndResetProcessedCount(): number {
const count = this.processedCount;
this.processedCount = 0;
return count;
}
public handleRequest(request: IncomingWebSocketRequest): void {