Skip to content

Commit

Permalink
fix(core) using non-blocking ngx.time
Browse files Browse the repository at this point in the history
  • Loading branch information
subnetmarco committed Apr 25, 2017
1 parent 3142495 commit 84ce53a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rcluster.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function _M.new(self, cfg)
self.cfg.keep_size = cfg.keep_size or 100
self.cfg.server = cfg.server[ math.random(1, #cfg["server"]) ] or nil

local ostime, nodes, name = os.time(), {}, self.cfg.name
local ostime, nodes, name = ngx.time(), {}, self.cfg.name
if node_cache[name] and node_cache[name][ostime] then
nodes = node_cache[name][ostime]
else
Expand Down

0 comments on commit 84ce53a

Please sign in to comment.