From 2d42ecb076f9c25010edcce5bda2cef6e5837225 Mon Sep 17 00:00:00 2001 From: "kibak.yoon" Date: Fri, 28 Apr 2017 16:05:03 +0900 Subject: [PATCH] sensord: sleep 10 ms instead of 100 ms if socket is unavailable temporarily Change-Id: I4c2552d18ce45bf16ff88703577279e19376418e Signed-off-by: kibak.yoon --- src/shared/stream_socket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/stream_socket.cpp b/src/shared/stream_socket.cpp index 0191f05..8ec9f7c 100644 --- a/src/shared/stream_socket.cpp +++ b/src/shared/stream_socket.cpp @@ -24,7 +24,7 @@ #include "sensor_log.h" -#define SLEEP_100_MS usleep(100000) +#define SLEEP_10_MS usleep(10000) using namespace ipc; @@ -54,7 +54,7 @@ ssize_t stream_socket::on_send(const void *buffer, size_t size) const if (len < 0) { if ((errno == EINTR) || (errno == EAGAIN) || (errno == EWOULDBLOCK)) { - SLEEP_100_MS; + SLEEP_10_MS; continue; } @@ -88,7 +88,7 @@ ssize_t stream_socket::on_recv(void *buffer, size_t size) const if (len < 0) { if ((errno == EINTR) || (errno == EAGAIN) || (errno == EWOULDBLOCK)) { - SLEEP_100_MS; + SLEEP_10_MS; continue; } -- 2.7.4