From 1f9d54fcd5f301c95ada1ff5d539aa4e701761c1 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Tue, 5 Nov 2024 09:50:11 +0800 Subject: [PATCH] check self.client_ips --- kong/clustering/rpc/manager.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kong/clustering/rpc/manager.lua b/kong/clustering/rpc/manager.lua index 22837235cedf..b91882068f3c 100644 --- a/kong/clustering/rpc/manager.lua +++ b/kong/clustering/rpc/manager.lua @@ -266,7 +266,9 @@ function _M:handle_websocket() self:_add_socket(s, rpc_capabilities) -- store DP's ip addr - self.client_ips[node_id] = ngx_var.remote_addr + if self.client_ips then + self.client_ips[node_id] = ngx_var.remote_addr + end s:start() local res, err = s:join()