moonbridge
diff moonbridge_http.lua @ 55:7a385a440fa1
Perform garbage collection before waiting for request
author | jbe |
---|---|
date | Sun Mar 22 23:33:55 2015 +0100 (2015-03-22) |
parents | e3df61bf62f4 |
children | 439eece506ac |
line diff
1.1 --- a/moonbridge_http.lua Sun Mar 22 16:17:14 2015 +0100 1.2 +++ b/moonbridge_http.lua Sun Mar 22 23:33:55 2015 +0100 1.3 @@ -887,6 +887,7 @@ 1.4 end 1.5 }) 1.6 -- read and parse request line: 1.7 + collectgarbage() -- avoid memory consumption while we wait for next request 1.8 local line = socket:readuntil("\n", remaining_header_size_limit) 1.9 if not line then return survive end 1.10 remaining_header_size_limit = remaining_header_size_limit - #line