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

Sometimes messages to injected iframe don't get a reply #71

Open
Gudahtt opened this issue Apr 21, 2021 · 0 comments
Open

Sometimes messages to injected iframe don't get a reply #71

Gudahtt opened this issue Apr 21, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@Gudahtt
Copy link
Member

Gudahtt commented Apr 21, 2021

When we send a message to the injected iframe, we attach a message handler that waits for a reply, assuming that the only reply will be the one that it expects. If it receives a different reply than expected, the message handler is removed and the callback is never called, leaving that method pending forever. This can happen when making multiple calls to the keyring in quick succession.

We should keep the reply listener attached until we see a reply, and ignore unexpected messages that might be responses to different calls. We should also consider adding a timeout, in case the reply never comes.

@Gudahtt Gudahtt added the bug Something isn't working label Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant