mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
fix #2155
This commit is contained in:
@@ -217,7 +217,8 @@ function mongo_client:disconnect()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function mongo_client:genId()
|
function mongo_client:genId()
|
||||||
local id = self.__id + 1
|
-- id should be int32, See https://github.com/cloudwu/skynet/issues/2155
|
||||||
|
local id = (self.__id + 1) & 0x7fffffff
|
||||||
self.__id = id
|
self.__id = id
|
||||||
return id
|
return id
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user