From 27fe2cf3a434a04d2a419bdc04569f2e52ec1954 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 4 Sep 2022 00:49:14 +0100 Subject: [PATCH] Stop wrong server ID message from spamming the logs --- hblink.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hblink.py b/hblink.py index 2c0dd21..c57526d 100755 --- a/hblink.py +++ b/hblink.py @@ -287,7 +287,9 @@ class OPENBRIDGE(DatagramProtocol): if compare_digest(_hash, _ckhs) and (_sockaddr == self._config['TARGET_SOCK'] or self._config['RELAX_CHECKS']): _peer_id = _data[11:15] if self._config['NETWORK_ID'] != _peer_id: - logger.error('(%s) OpenBridge packet discarded because NETWORK_ID: %s Does not match sent Peer ID: %s', self._system, int_id(self._config['NETWORK_ID']), int_id(_peer_id)) + f _stream_id not in self._laststrid: + logger.error('(%s) OpenBridge packet discarded because NETWORK_ID: %s Does not match sent Peer ID: %s', self._system, int_id(self._config['NETWORK_ID']), int_id(_peer_id)) + self._laststrid.append(_stream_id) return #This is a v1 packet, so all the extended stuff we can set to default