Remote-processor send returning 0 is not an error

BZ: 190038

Send can return a 0 size, it is normal.

Does not consider send return value 0 as an error.

Change-Id: Ic4801908b0771d5e0aba8c090fb9e9949d6e16fc
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
diff --git a/remote-processor/Socket.cpp b/remote-processor/Socket.cpp
index d79b45a..3530453 100644
--- a/remote-processor/Socket.cpp
+++ b/remote-processor/Socket.cpp
@@ -111,6 +111,9 @@
 
         if (!iAccessedSize || iAccessedSize == -1) {
 
+            // recv return value is 0 when the peer has performed an orderly shutdown.
+            // -1 if an error occurred
+            // In both case the read could not be achieve
             return false;
         }
         uiSize -= iAccessedSize;
@@ -129,7 +132,8 @@
 
         int32_t iAccessedSize = ::send(_iSockFd, &pucData[uiOffset], uiSize, MSG_NOSIGNAL);
 
-        if (!iAccessedSize || iAccessedSize == -1) {
+        // Return value of 0 is not an error
+        if (iAccessedSize == -1) {
 
             return false;
         }