Skip to content

Commit c2f9b2a

Browse files
Exception must be thrown outside the retry loop (#401)
* Exception must be thrown outside the retry loop * package-lock.json * Revert "package-lock.json" This reverts commit 2b266d6. --------- Co-authored-by: CK Kashyap <ckk@microsoft.com>
1 parent fb239fe commit c2f9b2a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/directLineStreaming.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,12 @@ export class DirectLineStreaming implements IBotConnection {
337337
}
338338
} catch (err) {
339339
console.error(`Failed to connect ${err}`);
340-
throw(err);
341340
}
342341

343342
await new Promise(r => setTimeout(r, this.getRetryDelay()));
344343
}
344+
345+
throw (new Error(`Failed to connect after ${MAX_RETRY_COUNT} attempts`));
345346
}
346347

347348
// Returns the delay duration in milliseconds

0 commit comments

Comments
 (0)