Skip to content
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

innerring: Don't stop the same listener twice #1291

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

alexvanin
Copy link
Contributor

When IR node configured without main chain, both morphListener and mainnetListener are pointing into single listener component. We should not call Stop() twice, because it may trigger channel closing in neo-go or other components and it can throw panic.

Related to nspcc-dev/neo-go#2420

When IR node configured without main chain, both
`morphListener` and `mainnetListener` are pointing
into single listener component. We should not call
`Stop()` twice, because it may trigger channel
closing in neo-go or other components and it
can throw panic.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #1291 (3fef650) into master (923db59) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1291      +/-   ##
==========================================
- Coverage   35.48%   35.48%   -0.01%     
==========================================
  Files         310      310              
  Lines       19234    19238       +4     
==========================================
  Hits         6826     6826              
- Misses      11869    11873       +4     
  Partials      539      539              
Impacted Files Coverage Δ
pkg/morph/event/listener.go 0.00% <0.00%> (ø)
cmd/neofs-adm/internal/modules/morph/initialize.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 923db59...3fef650. Read the comment docs.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
@carpawell
Copy link
Member

do we need that if it gonna be changed in the neo-go?

@AnnaShaleva
Copy link
Member

do we need that if it gonna be changed in the neo-go?

I think there's nothing wrong if you'll have this code.

@alexvanin alexvanin merged commit e62e028 into nspcc-dev:master Apr 5, 2022
@alexvanin alexvanin mentioned this pull request May 25, 2022
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
When IR node configured without main chain, both
`morphListener` and `mainnetListener` are pointing
into single listener component. We should not call
`Stop()` twice, because it may trigger channel
closing in neo-go or other components and it
can throw panic.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
aprasolova pushed a commit to aprasolova/neofs-node that referenced this pull request Oct 19, 2022
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants