fix retry nil
This commit is contained in:
@@ -11,6 +11,10 @@ local Upyun = require('lib.upyun')
|
|||||||
|
|
||||||
function upyun_upload.upload(filepath, filename, retry)
|
function upyun_upload.upload(filepath, filename, retry)
|
||||||
|
|
||||||
|
if retry == nil then
|
||||||
|
retry = 1
|
||||||
|
end
|
||||||
|
|
||||||
if retry > 3 then
|
if retry > 3 then
|
||||||
ngx.log(ngx.ERR, "failed to upload file : reach max retries")
|
ngx.log(ngx.ERR, "failed to upload file : reach max retries")
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user