Timer is not fired on fs read
yaa110 opened this issue · comments
Please consider the following code:
local file = fs.createReadStream("/dev/zero")
timer.setTimeout(1000, function()
file:destroy()
print("DONE")
end)
local req = http.request({
host = "localhost",
method = "POST",
headers = {
["Content-Type"] = 'text/plain',
["Transfer-Encoding"] = "chunked"
},
path = "/upload",
}, function(resp) print(resp.statusCode) end)
file:on("data", function(data) print(#data) end)
file:pipe(req)
Why isn't the timer fired after one second?
Cannot reproduce on Windows using luvit 2.16.0 or GitHub master. Is this still an issue? I don't have access to Linux at the moment.