http_add_connection: add connections to the front to be faster (and really fix bug #50059)

This commit is contained in:
goldsimon 2017-02-09 13:08:17 +01:00
parent 5743864744
commit ea093d3a53

View File

@ -340,14 +340,8 @@ static void
http_add_connection(struct http_state *hs) http_add_connection(struct http_state *hs)
{ {
/* add the connection to the list */ /* add the connection to the list */
if (http_connections == NULL) { hs->next = http_connections;
http_connections = hs; http_connections = hs;
} else {
struct http_state *last;
for(last = http_connections; last->next != NULL; last = last->next);
LWIP_ASSERT("last != NULL", last != NULL);
last->next = hs;
}
} }
static void static void