mirror of
https://github.com/lionsoul2014/ip2region.git
synced 2025-12-08 19:25:22 +00:00
auto close the handle after loaded the buffer
This commit is contained in:
parent
69a085f8cf
commit
c15be8c7b5
@ -265,6 +265,7 @@ function _M.load_content(dbPath)
|
||||
|
||||
local c = handle:read("*a")
|
||||
if c == nil then
|
||||
handle:close()
|
||||
return nil, string.format("failed to read xdb content")
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user