From f9ffb8650a2d6326eb4e9c7c6cfdc711255c675e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Thu, 19 Sep 2019 13:17:15 -0400 Subject: [PATCH] dht_proxy_client: listener should not be stopped here Moreover, when it's a subscribe, because the subscribe is direct --- src/dht_proxy_client.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dht_proxy_client.cpp b/src/dht_proxy_client.cpp index 09faf115..365ee27d 100644 --- a/src/dht_proxy_client.cpp +++ b/src/dht_proxy_client.cpp @@ -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(json); if (cb){ auto expired = json.get("expired", Json::Value(false)).asBool();