Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant