Fix network test not setting null

Reviewers: mferencevic

Reviewed By: mferencevic

Differential Revision: https://phabricator.memgraph.io/D1327
This commit is contained in:
Dominik Gleich 2018-03-28 15:15:59 +02:00
parent a9dd98f8b9
commit ad28ac5e7c

View File

@ -42,6 +42,7 @@ bool QueryServer(io::network::Socket &socket) {
while (len < query.size()) {
int got = socket.Read(response + len, query.size() - len);
if (got <= 0) return false;
response[got] = 0;
len += got;
}
if (std::string(response, strlen(response)) != query) return false;