dht_proxy_client: listener should not be stopped here

Moreover, when it's a subscribe, because the subscribe is direct
This commit is contained in:
Sébastien Blin authored and Adrien Béraud committed 2019-09-19 13:54:52 -04:00
1 parent 7fde8f63a8
commit f9ffb8650a
1 file changed
+3 -2
+3 -2
View File
@@ -1031,9 +1031,10 @@ DhtProxyClient::sendListen(const restinio::http_request_header_t header,
opstate->ok.store(false);
return;
}
if (json.size() == 0){ // it's the end
opstate->stop.store(true);
if (json.size() == 0) { // it's the end
break;
}
auto value = std::make_shared<Value>(json);
if (cb){
auto expired = json.get("expired", Json::Value(false)).asBool();