-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
openDatabase issue after HotReload #165
Comments
@deakjahn Hot reload should not be an issue, and in fact, if you keep a reference to the database, you should not open it again. I recommend like sqlite to open a database on start and close on stop. I'd like to be able to reproduce but I'm not sure what to even try. Can you elaborate your scenario (why are you calling openDatabase after hot restart)?
|
I don't normally reopen the database but I do under specific circumstances. Namely, if the user initiates a reset in the settings, that means I have to reload the database (possibly with different data than it had before). When this happens, I call my database refresh routine that:
Not really a serious issue, I don't do that regularly and restarting the whole app is but a small nuisance. And it's web only. And it doesn't influence the user, of course. Yes, I have three databases normally open. The refresh routine deals with them one by one: close, re-open, transaction. Close, re-open, transaction. |
From @deakjahn
Is it a known limitation that await _dbFactory.openDatabase() (web factory) never returns after a hot reload? I don't have the slightest problem with it on first run but after the first reload, the next line will never be reached. No log, nothing, just stops in the tracks.
The text was updated successfully, but these errors were encountered: