-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
PollingBlockTracker runs endlessly when started by an internal event #301
Comments
I discovered this when trying to reproduce this bug on extension: MetaMask/metamask-extension#28868 (on the At first I noticed that there was an account tracking controller polling token bug; the poller was kept alive by that controller. But when I commented out the code to start that poll, it was still kept alive due to this bug. |
We should be able to fix this by checking at the end of each loop to see if we should stop or not. Alternatively, maybe we could further separate the internal calls from the normal polling loop, so they don't rely on |
I spoke with Mark on Friday about this and it seems like the bug may be different than represented here. What we're seeing is that Quoting Mark:
He thought there should be a simpler solution and said:
After that he said:
The last he said was that he was leaning toward the "debounce" strategy as being the simplest. |
Recently we fixed a bug (in #284) that caused the block tracker to run endlessly upon failure. In fixing this, we accidentally introduced a new bug: when the polling block tracker is started by an internal function, it never stops.
The previous bug was fixed by ensuring that we ignore internal functions when deciding whether to stop the polling upon a listener being removed. But internal listeners still start the polling, and there is no listener removal, there is no opportunity for it to shut down.
The text was updated successfully, but these errors were encountered: