Skip to content
Snippets Groups Projects
Commit ae89365f authored by Adrien Béraud's avatar Adrien Béraud
Browse files

Update peer_discovery.cpp

parent 93cd8d54
No related branches found
No related tags found
No related merge requests found
......@@ -133,8 +133,7 @@ PeerDiscovery::DomainPeerDiscovery::loopListener()
msgpack::object obj = rcv.get();
if (obj.type == msgpack::type::STR) {
auto s = obj.as<std::string>();
if (!strcmp(s.c_str(), "q"))
if (lrunning_ and obj.as<std::string>() == "q")
publish(receiveFrom_);
} else if (obj.type == msgpack::type::MAP) {
for (unsigned i = 0; i < obj.via.map.size; i++) {
......@@ -248,8 +247,7 @@ PeerDiscovery::DomainPeerDiscovery::stopPublish(const std::string& type)
void
PeerDiscovery::DomainPeerDiscovery::stopDiscovery()
{
if (drunning_)
drunning_ = false;
drunning_ = false;
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment