Fix retry sleep time 65/170065/3
authorhyunho <hhstark.kang@samsung.com>
Tue, 13 Feb 2018 06:36:06 +0000 (15:36 +0900)
committerhyunho <hhstark.kang@samsung.com>
Tue, 13 Feb 2018 06:45:27 +0000 (15:45 +0900)
Change-Id: I62add03fe5976e7fd5f5afe20d9a2bc7778eafc1
Signed-off-by: hyunho <hhstark.kang@samsung.com>
src/message_port_common.c

index ec32d33..acdea9f 100755 (executable)
@@ -138,7 +138,7 @@ int read_socket(int fd,
        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)) {
@@ -152,6 +152,7 @@ int read_socket(int fd,
                                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);