Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Cast: Only poll once deviceCode is registered

Neeraj Guptacf92e1b0650c
diff --git a/apps/cast/src/pages/index.tsx b/apps/cast/src/pages/index.tsx
index b720b84c6f..f0dd64b6e5 100644
--- a/apps/cast/src/pages/index.tsx
+++ b/apps/cast/src/pages/index.tsx
@@ -115,6 +115,7 @@ export default function PairingMode() {
};
const pollForCastData = async () => {
+ if (codePending) return;
// see if we were acknowledged on the client.
// the client will send us the encrypted payload using our public key that we advertised.
// then, we can decrypt this and store all the necessary info locally so we can play the collection slideshow.
@@ -155,6 +156,10 @@ export default function PairingMode() {
publicKeyB64
);
} catch (e) {
+ // schedule init after 5 seconds
+ setTimeout(() => {
+ init();
+ }, 5000);
return;
}