Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix: do not call unregister_rpc_handler when exiting progress #753

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

zhangyifan27
Copy link
Contributor

When exiting progress dsn::task::get_current_node() is nullptr, so we shouldn't call dsn_rpc_unregiser_handler. Also, when the rpc_engine destructed, all handlers have been cleared, this is no need to call dsn_rpc_unregiser_handler.

rpc_server_dispatcher::~rpc_server_dispatcher()
{
    for (auto &h : _vhandlers) {
        delete h;
    }
    _vhandlers.clear();
    _handlers.clear();
    dassert(_handlers.size() == 0,
            "please make sure all rpc handlers are unregistered at this point");
}

@zhangyifan27 zhangyifan27 reopened this Feb 5, 2021
@acelyc111 acelyc111 merged commit 824b4d2 into XiaoMi:master Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants