From e97762879d614f2b54585b841abbe39ee39dd8d8 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Mon, 29 Nov 2010 14:39:04 +0100 Subject: [PATCH] reduced select() timeout from 1 second to 0.2 second to make mongoose snappier --- mongoose.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 5fb0a63d..2d05f262 100644 --- a/mongoose.c +++ b/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