Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
revert server changes in favor of PR #877 to get tests working for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeseese committed Mar 30, 2021
1 parent 2bd19ef commit 66fdd09
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/packages/core/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ export class Server extends Emittery<{ open: undefined; close: undefined }> {
}

public async close() {
// the connector gets initialized in the constructor
// rather than in the initialize function, so we need
// to make sure that we close it before throwing for
// the below conditions (i.e. connector tried to load
// but failed before initialize was called)
await this.#connector.close();

if (this.#status === Status.opening) {
// if opening
throw new Error(`Cannot close server while it is opening.`);
Expand All @@ -184,6 +177,7 @@ export class Server extends Emittery<{ open: undefined; close: undefined }> {

// and do all http cleanup, if any
this.#httpServer.close();
await this.#connector.close();
this.#status = Status.closed;
this.#app = void 0;

Expand Down

0 comments on commit 66fdd09

Please sign in to comment.