Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/resty/mongol/object_id.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ else
end
machineid = ngx.md5_bin(machineid):sub(1, 3)

local pid = num_to_le_uint(bit.band(ngx.var.pid, 0xFFFF), 2)
local pid = num_to_le_uint(bit.band(ngx.worker.pid(), 0xFFFF), 2)

local inc = 0
local function generate_id ( )
Expand Down