From 5b9337e1309558b422a61f420622f31f057b838f Mon Sep 17 00:00:00 2001 From: Noah Hilverling Date: Mon, 14 Aug 2017 08:27:04 +0200 Subject: [PATCH] Process: Fix JSON parsing error on process helper crash --- lib/base/process.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/base/process.cpp b/lib/base/process.cpp index 9107b7f88..178dcbbea 100644 --- a/lib/base/process.cpp +++ b/lib/base/process.cpp @@ -415,7 +415,7 @@ send_message: ssize_t rc = recv(l_ProcessControlFD, buf, sizeof(buf), 0); - if (rc < 0) + if (rc <= 0) return -1; String jresponse = String(buf, buf + rc); @@ -447,7 +447,7 @@ send_message: ssize_t rc = recv(l_ProcessControlFD, buf, sizeof(buf), 0); - if (rc < 0) + if (rc <= 0) return -1; String jresponse = String(buf, buf + rc); @@ -478,7 +478,7 @@ send_message: ssize_t rc = recv(l_ProcessControlFD, buf, sizeof(buf), 0); - if (rc < 0) + if (rc <= 0) return -1; String jresponse = String(buf, buf + rc);