Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ export class EVMP2pWorker extends BaseP2PWorker<IEVMBlock> {
this.multiThreadSync.stop();
logger.debug(`Stopping worker for chain ${this.chain} ${this.network}`);
await this.disconnect();
setTimeout(BaseEVMStateProvider.teardownRpcs, 100);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the setTimeout?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would crash the other services if done immediately.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it seems this is in the wrong place. We should call teardownRpcs after the other services are stopped.

}

async start() {
Expand Down