Skip to content

Commit

Permalink
fix(clustering/rpc): fix mistake of stop timer
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Jan 6, 2025
1 parent 30b4af7 commit d90ef35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kong/clustering/services/sync/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function _M:init_worker()
-- cp does not support kong.sync.v2
if not has_sync_v2 then
ngx.log(ngx.WARN, "rpc sync is disabled in CP.")
assert(self.rpc:sync_every(EACH_SYNC_DELAY), true) -- stop timer
assert(self.rpc:sync_every(EACH_SYNC_DELAY, true)) -- stop timer
return
end

Expand All @@ -89,7 +89,7 @@ function _M:init_worker()

-- if rpc is down we will also stop to sync
worker_events.register(function()
assert(self.rpc:sync_every(EACH_SYNC_DELAY), true) -- stop timer
assert(self.rpc:sync_every(EACH_SYNC_DELAY, true)) -- stop timer
end, "clustering:jsonrpc", "disconnected")
end

Expand Down

0 comments on commit d90ef35

Please sign in to comment.