microsoft-graph-toolkit
microsoft-graph-toolkit copied to clipboard
[BUG] [MGT-CHAT] Multiple timers running for Chat
Describe the bug StatefulGraphChatClient creates 2 new GraphNotificationClients - in the constructor and when updateGraphNotificationClient is called. This starts 2 shared worker timers. There are a couple of pieces of evidence for this:
- You can see that cleanup timer is triggered twice every interval
- You can add logging into Timer.ts and see that it is instantiated twice
To Reproduce Steps to reproduce the behavior:
- Look at the logs
Expected behavior We wouldn't expect multiple timers to be running and there may even be other implications to new GraphNotificationClient.
Screenshots
Environment (please complete the following information):
- OS: macOS Monterey 12.7.3
- Browser: Edge
- Framework: React
- Context: Web
- Version: MGT 4
- Provider: Msal2Provider
Additional context I am a MSFT FTE and can be reached at pelasne on Teams.