Skip to content

Commit

Permalink
Merge pull request #32 from lifeomic/skip-waiting-for-connections
Browse files Browse the repository at this point in the history
Skip waiting for proxy connections to close
  • Loading branch information
lars-mortenson authored Aug 30, 2021
2 parents 502d7a1 + 517db8b commit 0c4ef31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lifeomic/alpha-cli",
"version": "1.0.2",
"version": "1.0.3",
"description": "Curl-like CLI for the Alpha client",
"author": "LifeOmic <[email protected]>",
"license": "MIT",
Expand Down
6 changes: 2 additions & 4 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const callAlpha = async (config) => {
};

if (config.proxied) {
const server = alphaProxy(config, callAlpha).on('listening', () => {
alphaProxy(config, callAlpha).on('listening', () => {
console.log(`Proxy is listening on port ${config.proxyPort}; Press any key to quit;`);
});

Expand All @@ -42,9 +42,7 @@ if (config.proxied) {
process.stdin.setRawMode(true);
}
process.stdin.on('data', () => {
server.close(() => {
process.exit(0);
});
process.exit(0);
});
} else if (!skipRequest) {
callAlpha(config).then((result) => {
Expand Down

0 comments on commit 0c4ef31

Please sign in to comment.