Skip to content

Commit

Permalink
fix(clustering/rpc): check return value of kong.timer (#14112)
Browse files Browse the repository at this point in the history
This PR follows #14089.

KAG-6114
  • Loading branch information
chronolaw authored Jan 9, 2025
1 parent bb0a33e commit bd70457
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions kong/clustering/services/sync/rpc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,12 @@ function _M:sync_once(delay)
return true
end

return kong.timer:named_at(name, delay or 0, sync_once_impl, 0)
local ok, err = kong.timer:named_at(name, delay or 0, sync_once_impl, 0)
if not ok then
return nil, err
end

return true
end


Expand All @@ -440,7 +445,12 @@ function _M:sync_every(delay, stop)
return true
end

return kong.timer:named_every(name, delay, sync_handler)
local ok, err = kong.timer:named_every(name, delay, sync_handler)
if not ok then
return nil, err
end

return true
end


Expand Down

1 comment on commit bd70457

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:bd704572e9505cfdeceb486de443ec0a6a37f144
Artifacts available https://github.com/Kong/kong/actions/runs/12682532862

Please sign in to comment.