microsoft-graph-toolkit icon indicating copy to clipboard operation
microsoft-graph-toolkit copied to clipboard

[BUG] [MGT-CHAT] Multiple timers running for Chat

Open plasne opened this issue 1 year ago • 0 comments

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:

  1. You can see that cleanup timer is triggered twice every interval
  2. You can add logging into Timer.ts and see that it is instantiated twice

To Reproduce Steps to reproduce the behavior:

  1. 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 image

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.

plasne avatar Feb 22 '24 20:02 plasne