diff --git a/hgdriver/hgdev/hg_scanner_239.cpp b/hgdriver/hgdev/hg_scanner_239.cpp index dad08fe..b9a0635 100644 --- a/hgdriver/hgdev/hg_scanner_239.cpp +++ b/hgdriver/hgdev/hg_scanner_239.cpp @@ -1538,6 +1538,11 @@ void hg_scanner_239::thread_get_dves_image(void) // error handling ... VLOG_MINI_4(LOG_LEVEL_DEBUG_INFO, "Read HGEIntInfo: From = %d, Code = %d, Img_Index = %d, status = %s\n", info->From, info->Code, info->Img_Index, hg_scanner_err_description(status_)); } + + if (SCANNER_ERR_DEVICE_NOT_FOUND == ret) + { + break; + } } this_thread::sleep_for(chrono::milliseconds(10)); // stop 通过int端点返回 如果不反回则是固件问题,软件不做处理 diff --git a/hgdriver/hgdev/hg_scanner_300.cpp b/hgdriver/hgdev/hg_scanner_300.cpp index b9620c1..41d660a 100644 --- a/hgdriver/hgdev/hg_scanner_300.cpp +++ b/hgdriver/hgdev/hg_scanner_300.cpp @@ -305,6 +305,11 @@ void hg_scanner_300::thread_handle_usb_read(void) } } this_thread::sleep_for(chrono::milliseconds(10)); + + if (SCANNER_ERR_DEVICE_NOT_FOUND == ret) + { + break; + } } VLOG_MINI_2(LOG_LEVEL_DEBUG_INFO, "USB thread exit with code: %s, status = %s\n", hg_scanner_err_name(ret), hg_scanner_err_description(status_)); } diff --git a/hgdriver/hgdev/hg_scanner_306.cpp b/hgdriver/hgdev/hg_scanner_306.cpp index 64645a6..0b00047 100644 --- a/hgdriver/hgdev/hg_scanner_306.cpp +++ b/hgdriver/hgdev/hg_scanner_306.cpp @@ -256,6 +256,11 @@ void hg_scanner_306::thread_handle_usb_read(void) } } this_thread::sleep_for(chrono::milliseconds(10)); + + if (SCANNER_ERR_DEVICE_NOT_FOUND == ret) + { + break; + } } VLOG_MINI_2(LOG_LEVEL_DEBUG_INFO, "USB thread exit with code: %s, status = %s\n", hg_scanner_err_name(ret), hg_scanner_err_description(status_)); }