diff --git a/apisix/cli/ops.lua b/apisix/cli/ops.lua index 8ec624ef3003..0eaebae56c43 100644 --- a/apisix/cli/ops.lua +++ b/apisix/cli/ops.lua @@ -153,25 +153,6 @@ local function get_lua_path(conf) end -local function cleanup_unix_sockets(env) - local events_http_sock_path = env.apisix_home .. "/conf/worker_events.sock" - if pl_path.exists(events_http_sock_path) then - local ok, err = os_remove(events_http_sock_path) - if not ok then - util.die("failed to remove stale worker events sock file, error: ", err) - end - end - - local events_stream_sock_path = env.apisix_home .. "/conf/stream_worker_events.sock" - if pl_path.exists(events_stream_sock_path) then - local ok, err = os_remove(events_stream_sock_path) - if not ok then - util.die("failed to remove stale stream worker events sock file, error: ", err) - end - end -end - - local function init(env) if env.is_root_path then print('Warning! Running apisix under /root is only suitable for ' @@ -769,8 +750,6 @@ Please modify "admin_key" in conf/config.yaml . if not ok then util.die("failed to update nginx.conf: ", err, "\n") end - - cleanup_unix_sockets(env) end