1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-29 04:25:55 -04:00

make the connection handler sleep when there are no more connections pending

svn path=/icecast/branches/kh/icecast/; revision=7537
This commit is contained in:
Karl Heyes 2004-08-11 14:35:56 +00:00
parent fd9fc737aa
commit f976173d68

View File

@ -864,8 +864,6 @@ static void *_handle_connection(void *arg)
client_t *client;
while (global.running == ICE_RUNNING) {
thread_sleep (100000);
if (global.running != ICE_RUNNING) break;
/* grab a connection and set the socket to blocking */
while ((con = _get_connection())) {
@ -934,6 +932,7 @@ static void *_handle_connection(void *arg)
}
free(uri);
continue;
}
else if(httpp_parse_icy(parser, header, strlen(header))) {
/* TODO: Map incoming icy connections to /icy_0, etc. */
@ -949,6 +948,7 @@ static void *_handle_connection(void *arg)
avl_tree_unlock(global.source_tree);
_handle_source_request(con, parser, mount);
continue;
}
else {
ERROR0("HTTP request parsing failed");
@ -957,6 +957,7 @@ static void *_handle_connection(void *arg)
continue;
}
}
thread_sleep (100000);
}
DEBUG0 ("Connection thread done");