Skip to content

Commit

Permalink
Merge a8bd735 into 0640e06
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Jul 12, 2023
2 parents 0640e06 + a8bd735 commit 3fa430f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/beacon-node/src/network/core/networkCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,13 @@ export class NetworkCore implements INetworkCore {

this.clock.off(ClockEvent.epoch, this.onEpoch);

// Must close peer manager before disconnecting peers to
// prevent registering newly discovered peers afterwards
await this.peerManager.close();
this.logger.debug("network peerManager closed");
// Must goodbye and disconnect before stopping libp2p
await this.peerManager.goodbyeAndDisconnectAllPeers();
this.logger.debug("network sent goodbye to all peers");
await this.peerManager.close();
this.logger.debug("network peerManager closed");
await this.gossip.stop();
this.logger.debug("network gossip closed");
await this.reqResp.stop();
Expand Down

0 comments on commit 3fa430f

Please sign in to comment.