Skip to content

Commit

Permalink
fix(dns): return correct error message in parse_response
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Sep 16, 2023
1 parent 73017df commit 46ebdbf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions dns.lua
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,7 @@ local function parse_response(buf, id)
local answers = {}

if code ~= 0 then
answers.errcode = code
answers.errstr = resolver_errstrs[code] or 'unknown'
return nil, resolver_errstrs[code] or 'unknown'
end

local err
Expand Down

0 comments on commit 46ebdbf

Please sign in to comment.