From 21cd2ad07ce444b2feeb7dd8d3f3c190cabd69aa Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Fri, 1 Jul 2022 21:12:22 +0300 Subject: polaris/protocol: don't increment Message ids forever, got back to 0 after 100000 --- src/polaris/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3