Skip to content

Commit

Permalink
rpc disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Jan 3, 2025
1 parent e91b020 commit a14aec8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions kong/clustering/services/sync/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ function _M:init_worker()
assert(self.rpc:sync_every(EACH_SYNC_DELAY))

end, "clustering:jsonrpc", "connected")

-- 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
end, "clustering:jsonrpc", "disconnected")
end


Expand Down

0 comments on commit a14aec8

Please sign in to comment.