clean up handling of errors in route spec store
This commit is contained in:
@@ -191,7 +191,7 @@ pub fn initialize_veilid_wasm() {
|
||||
static INITIALIZED: AtomicBool = AtomicBool::new(false);
|
||||
#[wasm_bindgen()]
|
||||
pub fn initialize_veilid_core(platform_config: String) {
|
||||
if INITIALIZED.swap(true, Ordering::Relaxed) {
|
||||
if INITIALIZED.swap(true, Ordering::AcqRel) {
|
||||
return;
|
||||
}
|
||||
let platform_config: VeilidWASMConfig = veilid_core::deserialize_json(&platform_config)
|
||||
|
@@ -30,7 +30,7 @@ pub struct VeilidClient {}
|
||||
#[wasm_bindgen(js_class = veilidClient)]
|
||||
impl VeilidClient {
|
||||
pub async fn initializeCore(platformConfig: VeilidWASMConfig) {
|
||||
if INITIALIZED.swap(true, Ordering::Relaxed) {
|
||||
if INITIALIZED.swap(true, Ordering::AcqRel) {
|
||||
return;
|
||||
}
|
||||
console_error_panic_hook::set_once();
|
||||
|
Reference in New Issue
Block a user