Skip to content

Commit

Permalink
do not stop not started yet hapi server
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Oct 31, 2020
1 parent 13858ee commit 73fbadb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/server/http/http_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,11 @@ export class HttpServer {
return;
}

this.log.debug('stopping http server');
await this.server.stop();
const hasStarted = this.server.info.started > 0;
if (hasStarted) {
this.log.debug('stopping http server');
await this.server.stop();
}
}

private getAuthOption(
Expand Down

0 comments on commit 73fbadb

Please sign in to comment.