Skip to content

Commit 582aec1

Browse files
author
Matevz Morato
committed
Allow completely disable crashdumps
1 parent 3c96aed commit 582aec1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/device/DeviceBase.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,9 @@ unsigned int getCrashdumpTimeout(XLinkProtocol_t protocol) {
536536
void 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...");

0 commit comments

Comments
 (0)