diff options
author | hyunho <hhstark.kang@samsung.com> | 2018-02-13 15:36:06 +0900 |
---|---|---|
committer | hyunho <hhstark.kang@samsung.com> | 2018-02-13 15:45:27 +0900 |
commit | a5b5543203c0a5e695858fb51d307c8befbf93c5 (patch) | |
tree | 5cac6d52592e1c2b7ba2f1061d66612aaa21f427 | |
parent | 033dab59db013f2a045866e243c220f3c4f8ef69 (diff) | |
download | message-port-a5b5543203c0a5e695858fb51d307c8befbf93c5.tar.gz message-port-a5b5543203c0a5e695858fb51d307c8befbf93c5.tar.bz2 message-port-a5b5543203c0a5e695858fb51d307c8befbf93c5.zip |
Fix retry sleep time
Change-Id: I62add03fe5976e7fd5f5afe20d9a2bc7778eafc1
Signed-off-by: hyunho <hhstark.kang@samsung.com>
-rwxr-xr-x | src/message_port_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/message_port_common.c b/src/message_port_common.c index ec32d33..acdea9f 100755 --- a/src/message_port_common.c +++ b/src/message_port_common.c @@ -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); |