diff --git a/lib/alias.js b/lib/alias.js index e7a3f3a..5f29265 100644 --- a/lib/alias.js +++ b/lib/alias.js @@ -167,6 +167,13 @@ export default class Alias extends Now { console.log(`> Verification ${chalk.bold('OK')}!`); } + // unfortunately there's a situation where the verification + // ownership code path in the `catch` above makes the + // agent unexpectedly close. this is a workaround until + // we figure out what's going on with `node-spdy` + this._agent.close(); + this._agent._initAgent(); + const { created, uid } = await this.createAlias(depl, alias); if (created) { console.log(`${chalk.cyan('> Success!')} Alias created ${chalk.dim(`(${uid})`)}: ${chalk.bold(chalk.underline(`https://${alias}`))} now points to ${chalk.bold(`https://${depl.url}`)} ${chalk.dim(`(${depl.uid})`)}`);