Skip to content

Instantly share code, notes, and snippets.

@soumith
Last active January 1, 2016 13:19
Show Gist options
  • Save soumith/8150139 to your computer and use it in GitHub Desktop.
Save soumith/8150139 to your computer and use it in GitHub Desktop.
testing async http mem leak
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