Comparison

net/http/server.lua @ 6367:769a3577dd85

Merge 0.9->0.10
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 Aug 2014 09:23:24 +0100
parent 6082:d0e824a21861
parent 6360:ffcd3992a40c
child 6382:57d23c26039b
comparison
equal deleted inserted replaced
6355:c2d144d3f8dd 6367:769a3577dd85
96 function listener.onconnect(conn) 96 function listener.onconnect(conn)
97 local secure = conn:ssl() and true or nil; 97 local secure = conn:ssl() and true or nil;
98 local pending = {}; 98 local pending = {};
99 local waiting = false; 99 local waiting = false;
100 local function process_next() 100 local function process_next()
101 if waiting then log("debug", "can't process_next, waiting"); return; end 101 if waiting then return; end -- log("debug", "can't process_next, waiting");
102 waiting = true; 102 waiting = true;
103 while sessions[conn] and #pending > 0 do 103 while sessions[conn] and #pending > 0 do
104 local request = t_remove(pending); 104 local request = t_remove(pending);
105 --log("debug", "process_next: %s", request.path); 105 --log("debug", "process_next: %s", request.path);
106 --handle_request(conn, request, process_next); 106 --handle_request(conn, request, process_next);