From cedc084bb831f21325da66f36cefafcb8b4dfed3 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Mon, 11 Dec 2017 09:08:39 +0000 Subject: only close steam if succesful seems the result can be nil string or table flush: Operation timed out --- generate-json.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-json.lua b/generate-json.lua index 5b5cd74..e2febf6 100755 --- a/generate-json.lua +++ b/generate-json.lua @@ -58,7 +58,7 @@ function get_index_status(uri) local res = {} local status, modified local headers, stream = request.new_from_uri(uri):go(conf.http_timeout) - if stream then stream:shutdown() end + if type(stream) == "table" then stream:shutdown() end if headers then status = headers:get(":status") else -- cgit v1.2.3