loolwsd: Don't send an empty result in frame

Change-Id: Ia4cf4c6d49be4b65d075c8380994dd7115ba2dc6
This commit is contained in:
Pranav Kant 2016-07-19 23:15:10 +05:30
parent f9b86d749d
commit 319dd56598

View file

@ -67,8 +67,11 @@ bool AdminRequestHandler::adminCommandHandler(const std::vector<char>& payload)
tokens[0] == "mem_stats" ||
tokens[0] == "cpu_stats" )
{
const std::string responseFrame = tokens[0] + " " + model.query(tokens[0]);
sendTextFrame(responseFrame);
std::string responseFrame = tokens[0] + " ";
const std::string result = model.query(tokens[0]);
responseFrame += result;
if (result != "")
sendTextFrame(responseFrame);
}
else if (tokens[0] == "subscribe" && tokens.count() > 1)
{