Commit d71bfc8c authored by Dominik Charousset's avatar Dominik Charousset

Fix bugfix to segfault in `peer::dispose`

This patch is a followup for d78fe26 that didn't quite fix the bug.
parent 5833b523
......@@ -379,8 +379,12 @@ void peer::enqueue(msg_hdr_cref hdr, const any_tuple& msg) {
void peer::dispose() {
CPPA_LOG_TRACE(CPPA_ARG(this));
if (m_node) parent()->get_namespace().erase(*m_node);
// if m_node is nullptr, this peer has never been registered to the MM
// and does not have any proxies attached to it
if (m_node) {
parent()->get_namespace().erase(*m_node);
parent()->del_peer(this);
}
delete this;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment