vcl: fix ldp recv return on error
[vpp.git] / src / vcl / ldp.c
index d6e81d6..0dbc6a5 100644 (file)
@@ -1502,7 +1502,10 @@ recv (int fd, void *buf, size_t n, int flags)
     {
       size = vls_recvfrom (vlsh, buf, n, flags, NULL);
       if (size < 0)
-       errno = -size;
+       {
+         errno = -size;
+         size = -1;
+       }
     }
   else
     {