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

proxy server: flush response after all values are sent

parent ec8beec4
Branches
Tags
No related merge requests found
...@@ -563,10 +563,9 @@ DhtProxyServer::listen(restinio::request_handle_t request, ...@@ -563,10 +563,9 @@ DhtProxyServer::listen(restinio::request_handle_t request,
auto jsonVal = value->toJson(); auto jsonVal = value->toJson();
if (expired) if (expired)
jsonVal["expired"] = true; jsonVal["expired"] = true;
auto output = Json::writeString(jsonBuilder_, jsonVal) + "\n"; response->append_chunk(Json::writeString(jsonBuilder_, jsonVal) + "\n");
response->append_chunk(output);
response->flush();
} }
response->flush();
return true; return true;
}); });
return restinio::request_handling_status_t::accepted; return restinio::request_handling_status_t::accepted;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment