From 2953199c18f08175ab2130f54574cdee0eac0d05 Mon Sep 17 00:00:00 2001 From: "Andrew Chaney (netuoso)" <andrewc@pobox.com> Date: Tue, 12 May 2020 16:38:24 -0500 Subject: [PATCH] Close the dongle connection when the result is finished --- beembase/ledgertransactions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beembase/ledgertransactions.py b/beembase/ledgertransactions.py index fe30ffbc..e6e2a82e 100644 --- a/beembase/ledgertransactions.py +++ b/beembase/ledgertransactions.py @@ -53,6 +53,7 @@ class Ledger_Transaction(GrapheneUnsigned_Transaction): apdu_list = self.build_apdu(path, chain) for apdu in apdu_list: result = dongle.exchange(py23_bytes(apdu)) + dongle.close() sigs = [] signature = result sigs.append(Signature(signature)) @@ -64,6 +65,7 @@ class Ledger_Transaction(GrapheneUnsigned_Transaction): dongle = getDongle(True) apdu = self.build_apdu_pubkey(path, request_screen_approval) result = dongle.exchange(py23_bytes(apdu)) + dongle.close() offset = 1 + result[0] address = result[offset + 1: offset + 1 + result[offset]] # public_key = result[1: 1 + result[0]] -- GitLab