ra002890 commented on a change in pull request #19132:
URL: https://github.com/apache/superset/pull/19132#discussion_r826801910



##########
File path: superset-embedded-sdk/src/index.ts
##########
@@ -143,6 +144,14 @@ export async function embedDashboard({
   ourPort.emit('guestToken', { guestToken });
   log('sent guest token');
 
+  async function refreshGuestToken() {
+    const newGuestToken = await fetchGuestToken();
+    ourPort.emit('guestToken', { guestToken: newGuestToken });
+    setTimeout(refreshGuestToken, getGuestTokenRefreshTiming(newGuestToken));

Review comment:
       I will take a look on this, but it does not create a recursion that will 
consume memory on every new timeout? It will free the calling function?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to