Skip to content

Commit 018cb3a

Browse files
committed
fix key
Signed-off-by: Kuat Yessenov <[email protected]>
1 parent 78c3213 commit 018cb3a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/wasm.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,7 @@ bool WasmHandleBase::canary(const std::shared_ptr<PluginBase> &plugin,
472472
if (this->wasm() == nullptr) {
473473
return false;
474474
}
475-
std::string plugin_key(plugin->key());
476-
auto it = plugin_canary_cache_.find(plugin_key);
475+
auto it = plugin_canary_cache_.find(plugin->key());
477476
if (it != plugin_canary_cache_.end()) {
478477
return it->second;
479478
}
@@ -495,11 +494,11 @@ bool WasmHandleBase::canary(const std::shared_ptr<PluginBase> &plugin,
495494
if (!configuration_canary_handle->wasm()->configure(root_context, plugin)) {
496495
configuration_canary_handle->wasm()->fail(FailState::ConfigureFailed,
497496
"Failed to configure base Wasm plugin");
498-
plugin_canary_cache_[plugin_key] = false;
497+
plugin_canary_cache_[plugin->key()] = false;
499498
return false;
500499
}
501500
configuration_canary_handle->kill();
502-
plugin_canary_cache_[plugin_key] = true;
501+
plugin_canary_cache_[plugin->key()] = true;
503502
return true;
504503
}
505504

0 commit comments

Comments
 (0)