From 4d0051cd4b3f21ee0e4e3b96511d719a8c6aa438 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 99c13ab1f6e5..d57082662bed 100644 --- a/kong/clustering/rpc/manager.lua +++ b/kong/clustering/rpc/manager.lua @@ -286,7 +286,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()