From 8f2e6ad0673e2fe2e3407c895eecbd478885f2c5 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Fri, 13 Jan 2017 10:48:18 +0100 Subject: Do not call disconnect on connect device will be disconnected automatically in its destructor Signed-off-by: Szczepan Zalega --- NitrokeyManager.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/NitrokeyManager.cc b/NitrokeyManager.cc index b270eb3..833e916 100644 --- a/NitrokeyManager.cc +++ b/NitrokeyManager.cc @@ -61,7 +61,6 @@ namespace nitrokey{ } bool NitrokeyManager::connect() { - this->disconnect(); std::lock_guard lock(mex_dev_com); vector< shared_ptr > devices = { make_shared(), make_shared() }; for( auto & d : devices ){ @@ -74,7 +73,6 @@ namespace nitrokey{ bool NitrokeyManager::connect(const char *device_model) { - this->disconnect(); std::lock_guard lock(mex_dev_com); switch (device_model[0]){ case 'P': -- cgit v1.2.3