From 919b7842da0fb6a9098004df45aed6f9e8aedacd Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 10 Apr 2021 01:13:00 +0100 Subject: [PATCH] Tidy up sockaddr update from keepalives --- hblink.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hblink.py b/hblink.py index 886beb4..0eee520 100755 --- a/hblink.py +++ b/hblink.py @@ -218,9 +218,10 @@ class OPENBRIDGE(DatagramProtocol): self._config['_bcka'] = time() if _sockaddr != self._config['TARGET_SOCK']: h,p = _sockaddr - if h != self._config['TARGET_IP']: - self._config['TARGET_IP'] = h - logger.info('(%s) *BridgeControl* Source IP has changed for OBP, updating',self._system) + logger.info('(%s) *BridgeControl* Source IP and Port has changed for OBP from %s:%s to %s:%s, updating',self._system,self._config['TARGET_IP'],self._config['TARGET_port'],h,p) + self._config['TARGET_IP'] = h + self._config['TARGET_PORT'] = p + self._config['TARGET_SOCK'] = (h,p) else: h,p = _sockaddr