Skip to content

Commit

Permalink
fix: properly hang when ag-solo start is run
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed May 2, 2021
1 parent 16feacd commit b63135f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/solo/src/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ export default async function start(basedir, argv) {
swingSetRunning = true;
deliverOutbound();

const afterHellFreezesOver = new Promise(() => {});
if (!hostport) {
return;
return afterHellFreezesOver;
}

const deploys = typeof deploy === 'string' ? [deploy] : deploy;
Expand All @@ -410,7 +411,7 @@ export default async function start(basedir, argv) {
// Launch the agoric wallet deploys (if any). The assumption is that the CLI
// runs correctly under the same version of the JS engine we're currently
// using.
fork(
const cp = fork(
agoricCli,
[
`deploy`,
Expand All @@ -426,4 +427,6 @@ export default async function start(basedir, argv) {
}
},
);

return afterHellFreezesOver.then(() => cp.kill('SIGINT'));
}
2 changes: 1 addition & 1 deletion packages/solo/test/startsolo.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/sh
set -e
PORT=${PORT-8000}
AG_SOLO=$(cd ../src && pwd)/entrypoint.cjs
AG_SOLO=$(cd .. && pwd)/bin/ag-solo

TDIR="${TMPDIR-/tmp}/startsolo.$$"
trap 'rm -rf "$TDIR"' EXIT
Expand Down

0 comments on commit b63135f

Please sign in to comment.