guest_server: W/A code for non-blocking code 24/23424/3
authorJinhyung Choi <jinhyung2.choi@samsung.com>
Wed, 25 Jun 2014 09:27:55 +0000 (18:27 +0900)
committerJinhyung Choi <jinhyung2.choi@samsung.com>
Wed, 25 Jun 2014 10:45:03 +0000 (19:45 +0900)
guest server will be rebuilt.

Change-Id: Ieebf07e202163ec28bed09aa9d1e8e1d08ea9f94
Signed-off-by: Jinhyung Choi <jinhyung2.choi@samsung.com>
tizen/src/guest_server.c

index 5d6815a..828d746 100644 (file)
@@ -523,8 +523,14 @@ static void server_process(void)
                             (struct sockaddr*) &client_addr, &client_len);
 
         if (read_cnt < 0) {
-            if (errno == EAGAIN)
+            if (errno == EAGAIN || errno == EWOULDBLOCK) {
+#ifdef _WIN32
+                Sleep(2);
+#else
+                usleep(2000);
+#endif
                 continue;
+            }
             INFO("fail to recvfrom in guest_server:%d\n", errno);
             break;
         } else if (read_cnt == 0) {
@@ -537,6 +543,7 @@ static void server_process(void)
         TRACE("readbuf:%s\n", readbuf);
 
         command_handler(readbuf, &client_addr);
+
     }
 }