summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-07-02 15:35:06 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-07-02 15:35:06 +0300
commit28560dbba91d077d871fed12d25576099c413555 (patch)
tree04d3c742e7ac29072992bff4ccb66ba7dc76d58d /src
parent739f8ea83b1420d7fd664900287158dbcde83791 (diff)
polaris/protocol: improve debug logs
Diffstat (limited to 'src')
-rw-r--r--src/polaris/protocol.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/polaris/protocol.py b/src/polaris/protocol.py
index fe20761..a86ed84 100644
--- a/src/polaris/protocol.py
+++ b/src/polaris/protocol.py
@@ -926,6 +926,8 @@ class UDPConnection(threading.Thread, ConnectionStatusListener):
# pick next (wrapped) message to send
wm = self._get_next_message() # wm means "wrapped message"
if wm:
+ one_shot = isinstance(wm.message, (AckMessage, NakMessage))
+
if not isinstance(wm.message, (AckMessage, NakMessage)):
old_seq = wm.seq
wm.seq = self.outseq
@@ -935,7 +937,7 @@ class UDPConnection(threading.Thread, ConnectionStatusListener):
# message had)
raise RuntimeError(f'run: seq must be set for {wm.__class__.__name__}')
- self._logger.debug(f'run: sending message: {wm.message}')
+ self._logger.debug(f'run: sending message: {wm.message}, one_shot={one_shot}, phase={wm.phase}')
encrypted = False
try:
wm.message.encrypt(outkey=self.encoutkey, inkey=self.encinkey,
@@ -948,7 +950,6 @@ class UDPConnection(threading.Thread, ConnectionStatusListener):
if encrypted:
buf = wm.message.frame.pack()
- one_shot = isinstance(wm.message, (AckMessage, NakMessage))
# self._logger.debug(f'run: raw data to be sent: {buf.hex()}')
# sending the first time