Skip to content

Commit af63e38

Browse files
resolved comments
1 parent 00aaa22 commit af63e38

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/server.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export default async (ctx: Context): Promise<FastifyInstance<Server, IncomingMes
118118
}
119119

120120
if (contextId && ctx.contextToSnapshotMap) {
121-
ctx.contextToSnapshotMap.set(contextId, 0);
121+
ctx.contextToSnapshotMap.set(contextId, '0');
122122
ctx.log.debug(`Marking contextId as captured and added to queue: ${contextId}`);
123123
}
124124

@@ -257,10 +257,9 @@ export default async (ctx: Context): Promise<FastifyInstance<Server, IncomingMes
257257
if(counter<=0){
258258
throw new Error('Snapshot processing failed');
259259
}
260+
contextStatus = ctx.contextToSnapshotMap.get(contextId);
260261
// Wait 5 seconds before next check
261262
await new Promise(resolve => setTimeout(resolve, 5000));
262-
263-
contextStatus = ctx.contextToSnapshotMap.get(contextId);
264263
counter--;
265264
}
266265

0 commit comments

Comments
 (0)