소스 검색

reduced select() timeout from 1 second to 0.2 second to make mongoose snappier

Sergey Lyubka 14 년 전
부모
커밋
e97762879d
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      mongoose.c

+ 2 - 2
mongoose.c

@@ -3912,8 +3912,8 @@ static void master_thread(struct mg_context *ctx) {
       add_to_set(sp->sock, &read_set, &max_fd);
     }
 
-    tv.tv_sec = 1;
-    tv.tv_usec = 0;
+    tv.tv_sec = 0;
+    tv.tv_usec = 200 * 1000;
 
     if (select(max_fd + 1, &read_set, NULL, NULL, &tv) < 0) {
 #ifdef _WIN32