wasm fixes

This commit is contained in:
John Smith
2023-03-12 12:24:21 -04:00
parent f8060715ce
commit 0ea858b08e
10 changed files with 84 additions and 74 deletions

View File

@@ -118,15 +118,18 @@ class _MyAppState extends State<MyApp> with UiLoggy {
});
await Veilid.instance.attach();
} else if (!startup && _startedUp) {
await Veilid.instance.shutdownVeilidCore();
if (_updateProcessor != null) {
await _updateProcessor;
try {
await Veilid.instance.shutdownVeilidCore();
if (_updateProcessor != null) {
await _updateProcessor;
}
} finally {
setState(() {
_updateProcessor = null;
_updateStream = null;
_startedUp = false;
});
}
setState(() {
_updateProcessor = null;
_updateStream = null;
_startedUp = false;
});
}
}