Skip to content

Commit

Permalink
Merge pull request #2395 from joshmoore/12233-close-importproc
Browse files Browse the repository at this point in the history
Close ImportProcessPrx instances (Fix #12233)
  • Loading branch information
jburel committed May 1, 2014
2 parents a0985cf + 77e45c0 commit 0532e07
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/blitz/src/ome/formats/importer/ImportLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,14 @@ public List<Pixels> importImage(final ImportContainer container, int index,
failingChecksums = cve.failingChecksums;
throw cve;
} finally {

try {
proc.close();
} catch (Exception e) {
log.warn("Exception while closing proc", e);
}


notifyObservers(new ImportEvent.FILESET_UPLOAD_END(
null, index, srcFiles.length, null, null, srcFiles,
checksums, failingChecksums, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6365,6 +6365,11 @@ Object importImageFile(SecurityContext ctx, ImportableObject object,
failingChecksums = cve.failingChecksums;
return new ImportException(cve);
} finally {
try {
proc.close();
} catch (Exception e) {
dsFactory.getLogger().error(this, "Cannot close import process.");
}
library.notifyObservers(new ImportEvent.FILESET_UPLOAD_END(
null, 0, srcFiles.length, null, null, srcFiles,
checksums, failingChecksums, null));
Expand Down

0 comments on commit 0532e07

Please sign in to comment.