File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -536,8 +536,9 @@ unsigned int getCrashdumpTimeout(XLinkProtocol_t protocol) {
536536void DeviceBase::closeImpl () {
537537 using namespace std ::chrono;
538538 auto t1 = steady_clock::now ();
539+ auto timeout = getCrashdumpTimeout (deviceInfo.protocol );
539540 bool shouldGetCrashDump = false ;
540- if (!dumpOnly) {
541+ if (!dumpOnly && timeout > 0 ) {
541542 pimpl->logger .debug (" Device about to be closed..." );
542543 try {
543544 if (hasCrashDump ()) {
@@ -586,7 +587,6 @@ void DeviceBase::closeImpl() {
586587 pimpl->rpcClient = nullptr ;
587588
588589 if (!dumpOnly) {
589- auto timeout = getCrashdumpTimeout (deviceInfo.protocol );
590590 // Get crash dump if needed
591591 if (shouldGetCrashDump && timeout > 0 ) {
592592 pimpl->logger .debug (" Getting crash dump..." );
You can’t perform that action at this time.
0 commit comments