Skip to content

Commit

Permalink
fix: close REST API server before closing network (#6061)
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Oct 24, 2023
1 parent 18dc0c9 commit ace85ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/node/nodejs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ export class BeaconNode {
this.status = BeaconNodeStatus.closing;
this.sync.close();
this.backfillSync?.close();
if (this.restApi) await this.restApi.close();
await this.network.close();
if (this.metricsServer) await this.metricsServer.close();
if (this.monitoring) this.monitoring.close();
if (this.restApi) await this.restApi.close();
await this.chain.persistToDisk();
await this.chain.close();
if (this.controller) this.controller.abort();
Expand Down

0 comments on commit ace85ff

Please sign in to comment.