diff --git a/src/spawn.ts b/src/spawn.ts index a50a39b..fe9b985 100644 --- a/src/spawn.ts +++ b/src/spawn.ts @@ -256,7 +256,10 @@ export function startCollator( p[wsPort].stdout.pipe(log); p[wsPort].stderr.on("data", function (chunk) { let message = chunk.toString(); - if (message.includes("Listening for new connections")) { + let ready = + message.includes("Running JSON-RPC WS server:") || + message.includes("Listening for new connections"); + if (ready) { resolve(); } log.write(message); @@ -291,7 +294,10 @@ export function startSimpleCollator( p[port].stdout.pipe(log); p[port].stderr.on("data", function (chunk) { let message = chunk.toString(); - if (message.includes("Listening for new connections")) { + let ready = + message.includes("Running JSON-RPC WS server:") || + message.includes("Listening for new connections"); + if (ready) { resolve(); } log.write(message);