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

fix(blockchain-link): stop ripple ping timeout if api disconnected #16680

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

szymonlesisz
Copy link
Contributor

Description

yarn workspace @trezor/blockchain-link test:unit --coverage=false

ends with:

A worker process has failed to exit gracefully and has been force exited.
This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks.
Active timers can also cause this, ensure that .unref() was called on them.

there were 2 reasons:

  1. setPingTimeout is calling itself recursively. now it should stop if api is disconnected
  2. worker.dispose() is async (at least in ripple worker) and it is awaited in tests teardown, but it was never awaited in baseWorker while processing the request

@szymonlesisz szymonlesisz added the no-project This label is used to specify that PR doesn't need to be added to a project label Jan 28, 2025
@mroz22
Copy link
Contributor

mroz22 commented Jan 28, 2025

good, it even fixes the "exceeded listeners" issue in tests. I just tested using setup in this commit 5bcc88b + --detectOpenHandles args

@mroz22 mroz22 merged commit 0342e33 into develop Jan 29, 2025
46 of 47 checks passed
@mroz22 mroz22 deleted the fix/bl-ping-timeout branch January 29, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-project This label is used to specify that PR doesn't need to be added to a project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants