summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-07-01 21:12:22 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-07-01 21:12:22 +0300
commit21cd2ad07ce444b2feeb7dd8d3f3c190cabd69aa (patch)
tree099d0db6938e7a55b01ac082d4955a0024c1f4a6
parent9790a323c12f899e6839e7368cef82840766fe6b (diff)
polaris/protocol: don't increment Message ids forever, got back to 0 after 100000
-rw-r--r--src/polaris/protocol.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/polaris/protocol.py b/src/polaris/protocol.py
index ffdcee3..3a171f8 100644
--- a/src/polaris/protocol.py
+++ b/src/polaris/protocol.py
@@ -147,7 +147,7 @@ class Message:
@staticmethod
def next_id():
_id = Message._global_id
- Message._global_id += 1
+ Message._global_id = (Message._global_id + 1) % 100000
return _id
@staticmethod