Skip to content

Commit

Permalink
fix(sync): prevent unnecessary modifications to kong.default_workspace (
Browse files Browse the repository at this point in the history
  • Loading branch information
chobits authored and bungle committed Nov 18, 2024
1 parent 374daf7 commit bfd95fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kong/clustering/services/sync/rpc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ local function do_sync()
-- and replace the old one with it
local default_ws_changed
for _, delta in ipairs(deltas) do
if delta.type == "workspaces" and delta.entity.name == "default" then
if delta.type == "workspaces" and delta.entity.name == "default" and
kong.default_workspace ~= delta.entity.id
then
kong.default_workspace = delta.entity.id
default_ws_changed = true
break
Expand Down

0 comments on commit bfd95fd

Please sign in to comment.