unsigned int left = size;
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 };
int bytes_read = 0;
char* buffer = static_cast<char*>(buf);
std::lock_guard<std::recursive_mutex> lock(mutex_);
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);