Skip to content

Commit c6ab9ba

Browse files
committed
Retry getting info endpoint up to 10 times
1 parent 8c48605 commit c6ab9ba

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/utils/manage.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,14 @@ async function fetchHealth(): Promise<boolean> {
2626
}
2727
async function fetchLocalStackSessionId(): Promise<string> {
2828
// retry a few times to allow LocalStack to start up and info become available
29-
for (let attempt = 0; attempt < 5; attempt++) {
29+
for (let attempt = 0; attempt < 10; attempt++) {
3030
try {
3131
const response = await fetch("http://127.0.0.1:4566/_localstack/info");
3232
if (response.ok) {
3333
const json = await response.json();
3434
if (typeof json === "object" && json !== null && "session_id" in json) {
3535
return (json as { session_id?: string }).session_id ?? "";
3636
}
37-
return "";
3837
}
3938
} catch {
4039
// ignore error and retry

0 commit comments

Comments
 (0)