You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shutdownExit envent handler should be held until at least when the registered callback is called:
fyi, this function may has a bug:
void Wasm::initializeLifecycle(Server::ServerLifecycleNotifier& lifecycle_notifier) {
auto weak = std::weak_ptr<Wasm>(std::static_pointer_cast<Wasm>(shared_from_this()));
lifecycle_notifier.registerCallback(Server::ServerLifecycleNotifier::Stage::ShutdownExit,
[this, weak](Event::PostCb post_cb) {
auto lock = weak.lock();
if (lock) { // See if we are still alive.
server_shutdown_post_cb_ = std::move(post_cb);
}
});
}
because the comment of registerCallback says the caller should keep the return value(HandlePtr) of registerCallback. Otherwise the callback is unregistered when the return value is deleted.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.
The shutdownExit envent handler should be held until at least when the registered callback is called:
fyi, this function may has a bug:
because the comment of registerCallback says the caller should keep the return value(HandlePtr) of registerCallback. Otherwise the callback is unregistered when the return value is deleted.
The text was updated successfully, but these errors were encountered: