diff options
author | Carlo Landmeter <clandmeter@alpinelinux.org> | 2017-12-08 08:40:13 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@alpinelinux.org> | 2017-12-08 08:40:13 +0000 |
commit | c41aa90a9e95358e83e722c2aed42316a980e988 (patch) | |
tree | 127e8473cf6145c3e1f5d8955173489d60b26ccb | |
parent | b8b9a596aef96cfcf06ad38e59262cea5c1944f2 (diff) | |
download | alpine-mirror-status-c41aa90a9e95358e83e722c2aed42316a980e988.tar.bz2 alpine-mirror-status-c41aa90a9e95358e83e722c2aed42316a980e988.tar.xz |
only close stream when its open
-rwxr-xr-x | generate-json.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generate-json.lua b/generate-json.lua index b10f039..5b5cd74 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) - stream:shutdown() + if stream then stream:shutdown() end if headers then status = headers:get(":status") else |