Commit a937e3aa authored by Vincent Pelletier's avatar Vincent Pelletier

Simplify overflow handling.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1759 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9ec55c99
......@@ -236,11 +236,7 @@ class Connection(BaseConnection):
def _getNextId(self):
next_id = self.cur_id
# Deal with an overflow.
if self.cur_id == 0xffffffff:
self.cur_id = 0
else:
self.cur_id += 1
self.cur_id = (next_id + 1) & 0xffffffff
return next_id
def close(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment