Skip to content

Commit

Permalink
Only close the cache db if it is not null.
Browse files Browse the repository at this point in the history
This fixes a bug where the cache db is not closed if an exception occurs when opening it. This unhandled exception will cause Nextflow to fail and prevent the Global.cleanUp() from being called.

Signed-off-by: Rob Syme <[email protected]>
  • Loading branch information
robsyme committed Jan 2, 2025
1 parent 1b0d452 commit c5e5fa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/nextflow/src/main/groovy/nextflow/Session.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ class Session implements ISession {
log.warn("Failed to cleanup work dir: ${workDir.toUriString()}")
}
finally {
db.close()
db?.close()
}
}

Expand Down

0 comments on commit c5e5fa4

Please sign in to comment.