0
|
1 --- mongoose/mongoose.c 2012-03-11 23:41:35.000000000 +0100
|
|
2 +++ mongoose.c 2012-06-22 13:44:40.093202063 +0200
|
|
3 @@ -3844,10 +3844,8 @@
|
|
4 }
|
|
5
|
|
6 static void discard_current_request_from_buffer(struct mg_connection *conn) {
|
|
7 - char *buffered;
|
|
8 int buffered_len, body_len;
|
|
9
|
|
10 - buffered = conn->buf + conn->request_len;
|
|
11 buffered_len = conn->data_len - conn->request_len;
|
|
12 assert(buffered_len >= 0);
|
|
13
|
|
14 @@ -4148,7 +4146,13 @@
|
|
15
|
|
16 // Wait until mg_fini() stops
|
|
17 while (ctx->stop_flag != 2) {
|
|
18 - (void) sleep(0);
|
|
19 +#if defined(__linux)
|
|
20 + usleep(100000);
|
|
21 +#elif defined(_WIN32)
|
|
22 + Sleep(100);
|
|
23 +#else
|
|
24 +#error Support your platform here
|
|
25 +#endif
|
|
26 }
|
|
27 free_context(ctx);
|
|
28
|