Skip to content

Commit

Permalink
Change run.ts to wait for port to be ready.
Browse files Browse the repository at this point in the history
Add an await operator to wait for server to be ready before client makes requests.
Prevents "ConnectionError: connect ECONNREFUSED ::1:9200" error
  • Loading branch information
ronitagarwala01 committed Dec 12, 2023
1 parent 80196c3 commit eba5278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export async function launch({
: launchDocker(props))

try {
Promise.race([
await Promise.race([
waitPort({ port, protocol: 'http' }),
neverResolve(waitUntilStopped()),
])
Expand Down

0 comments on commit eba5278

Please sign in to comment.