Currently, the socket mode is blocking. We should handle EINTR error to
receive the data properly.
Change-Id: I3d3687658a0d2f2349e22bfc5494cdea502123f8
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
return -EIO; // LCOV_EXCL_STOP
}
+ if (errno == EINTR) {
+ usleep(100 * 1000);
+ continue;
+ }
+
if (bytes < 0)
return -errno; // LCOV_EXCL_LINE
}
if (nb == -1) {
- if (errno == EINTR) continue;
+ if (errno == EINTR) {
+ usleep(100 * 1000);
+ continue;
+ }
_E("read_socket: ...error fd %d: errno %d\n", fd_, errno);
fcntl(fd_, F_SETFL, flags);