Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: let etcd v3 read_watch handle the case where a chunk contains partial event or multiple events #154

Merged
merged 14 commits into from
Mar 3, 2022
2 changes: 1 addition & 1 deletion lib/resty/etcd/v3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ local function request_chunk(self, method, path, opts, timeout)
for _, chunk in ipairs(chunks) do
body, err = decode_json(chunk)
if not body then
return nil, "failed to decode json body: " .. (err or " unkwon")
return nil, "failed to decode json body: " .. (err or " unknown")
elseif body.error and body.error.http_code >= 500 then
-- health_check retry should do nothing here
-- and let connection closed to create a new one
Expand Down