From d365255a952db38e6596799ef953c1b0e7769425 Mon Sep 17 00:00:00 2001 From: dj2ls Date: Thu, 6 Oct 2022 11:47:19 +0200 Subject: [PATCH] arq cleanup after sending close frames --- tnc/data_handler.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tnc/data_handler.py b/tnc/data_handler.py index 28fd5aaa..e42b3ec6 100644 --- a/tnc/data_handler.py +++ b/tnc/data_handler.py @@ -1407,9 +1407,13 @@ class DATA: self.IS_ARQ_SESSION_MASTER = False static.ARQ_SESSION = False + + # we need to send disconnect frame before doing arq cleanup + # we would loose our session id then + self.send_disconnect_frame() self.arq_cleanup() - self.send_disconnect_frame() + def received_session_close(self, data_in: bytes): """ @@ -1649,11 +1653,13 @@ class DATA: + "]" ) self.datachannel_timeout = True - self.arq_cleanup() + # Attempt to cleanup the far-side, if it received the # open_session frame and can still hear us. self.close_session() + + self.arq_cleanup() return False # Shouldn't get here..