A decentralized music tracking and discovery platform built on AT Protocol 🎵
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: enhance session refresh logic to trigger token refresh and increase delay

+4 -2
+4 -2
apps/api/src/db.ts
··· 149 149 chalk.cyan(session.key), 150 150 session.expiresAt 151 151 ); 152 - await createAgent(ctx.oauthClient, session.key); 153 - await new Promise((r) => setTimeout(r, 100)); 152 + const agent = await createAgent(ctx.oauthClient, session.key); 153 + // Trigger a token refresh by fetching preferences 154 + await agent.getPreferences(); 155 + await new Promise((r) => setTimeout(r, 500)); 154 156 } 155 157 156 158 console.log(