Skip to content

Commit

Permalink
feat(request-debugging): fix a bug when no child is present
Browse files Browse the repository at this point in the history
  • Loading branch information
Oyami-Srk committed Sep 23, 2024
1 parent 9854a64 commit 4b4acd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kong/timing/context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ function _M:to_json()

self:set_root_context_prop("dangling", dangling)
self:finalize(self.root_context)
self.root_context.total_time_without_upstream = self:get_total_time_without_upstream()
if self.root_context.child ~= nil then
self.root_context.total_time_without_upstream = self:get_total_time_without_upstream()
end
return assert(cjson.encode(self.root_context))
end

Expand Down

0 comments on commit 4b4acd2

Please sign in to comment.