]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_vhost/socket.c
vhost: fix peer close check
[dpdk.git] / lib / librte_vhost / socket.c
index 85c64485c2bb0af42d7f00d1f782823ed2c5bd7a..7c8012179049227622e952d2a921c3c5726df1be 100644 (file)
@@ -127,7 +127,8 @@ read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,
 
        ret = recvmsg(sockfd, &msgh, 0);
        if (ret <= 0) {
-               VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
+               if (ret)
+                       VHOST_LOG_CONFIG(ERR, "recvmsg failed\n");
                return ret;
        }