good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 3faae5de authored by Marius van der Wijden's avatar Marius van der Wijden Committed by GitHub
Browse files

ethstats: avoid creating subscriptions on background goroutine (#22587)


This fixes an issue where the ethstats service could crash if geth was
started and then immediately stopped due to an internal error. The
cause of the crash was a nil subscription being returned by the backend,
because the background goroutine creating them was scheduled after
the backend had already shut down.

Moving the creation of subscriptions into the Start method, which runs
synchronously during startup of the node, means the returned subscriptions
can never be 'nil'.

Co-authored-by: default avatarFelix Lange <fjl@twurst.com>
Co-authored-by: default avatarMartin Holst Swende <martin@swende.se>
parent 44fe4669
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment