unsigned int left = nbytes;
ssize_t nb;
int retry_cnt = 0;
- const struct timespec TRY_SLEEP_TIME = { 0, 500 * 1000 * 1000 };
+ struct timespec TRY_SLEEP_TIME = { 0, 5 * 1000 * 1000 };
*bytes_read = 0;
while (left && (retry_cnt < MAX_RETRY_CNT)) {
LOGE("read_socket: %d errno, sleep and retry ...", errno);
retry_cnt++;
nanosleep(&TRY_SLEEP_TIME, 0);
+ TRY_SLEEP_TIME.tv_nsec *= 2;
continue;
}
LOGE("read_socket: ...error fd %d: errno %d\n", fd, errno);