From 9e7a94a8525f0d3aaec1a4b9e9cab37e70b6c8ea Mon Sep 17 00:00:00 2001 From: Miguel Ruiz de Sotto Date: Tue, 16 Jan 2024 17:22:11 +0100 Subject: [PATCH] shutdown socket before closing Signed-off-by: Miguel Ruiz de Sotto --- ledgerblue/commTCP.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ledgerblue/commTCP.py b/ledgerblue/commTCP.py index 639010d..922235c 100644 --- a/ledgerblue/commTCP.py +++ b/ledgerblue/commTCP.py @@ -79,6 +79,7 @@ def apduMaxDataSize(self): def close(self): try: + self.socket.shutdown(socket.SHUT_RD) self.socket.close() self.socket = None except: