-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of Marketmaker crashing or being unavailable during …
…login (#461) There were two things that could cause the `Cannot read property 'focus' of null` error: ### Marketmaker crashing right at logging in You can reproduce this in `master` by having `killall marketmaker` ready in the terminal and execute it multiple times right after pressing "Login". ##### Solution Seems we were not detecting Marketmaker crashing on login, so I fixed that. ### Not being able to connect to Marketmaker For example if the user had entered an invalid remote Marketmaker URL or some firewall preventing the communication. ##### Solution The problem is that we tried to change the state of the `LoginBox` component after it was unmounted, replaced by the `LoggingIn` component, and since it was unmounted already, `this.passwordInputRef.current` was undefined a threw. The solution is to check whether the component is mounted, and if it is, we hadle the error normally by resetting the state, otherwise mount it again and show the error in an error dialog. I also improved the error message when HyperDEX cannot connect to Marketmaker.
- Loading branch information
1 parent
3a56e46
commit f12fe3c
Showing
3 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters