forked from checksum0/go-electrum
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic in listenPush #4
Comments
Some new cases of
|
Another case: https://github.com/keep-network/keep-core/actions/runs/5663040756/job/15344593515.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally posted in checksum0#10.
When working on testnet and mainnet integration tests in keep-network/keep-core#3599 we stumbled upon random panics when running tests:
I think the problem lies in how the library handles closing the connection.
SubscribeHeaders
creates a goroutine that writes tos.pushHandlers
map in thelistenPush
function. IfShutdown()
is called at the same time, unfortunate ordering of calls can lead to clearings.pushHandlers = nil
and then attempting tos.pushHandlers[method] = append(s.pushHandlers[method], c)
.Separately from this issue, I think the goroutines created in
SubscribeHeaders
are leaking given there is no clear exit signal for them - the channel returned bylistenPush
is never closed and they are stuck on reading.The text was updated successfully, but these errors were encountered: