Last active
January 1, 2016 13:19
-
-
Save soumith/8150139 to your computer and use it in GitHub Desktop.
testing async http mem leak
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local async = require 'async' | |
local http = require 'socket.http' | |
local ltn12 = require 'ltn12' | |
function start() | |
local url = 'tcp://localhost:8082/' | |
while true do | |
print(os.date()) | |
local response = {} | |
local ok,code = http.request{ | |
url = url, | |
method = 'GET', | |
sink = ltn12.sink.table(response), | |
headers = { | |
['Connection'] = 'close' | |
} | |
} | |
end | |
end | |
start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment