Skip to content

Commit

Permalink
Merge pull request Adobe-Consulting-Services#34 from yan-kisen/patch-1
Browse files Browse the repository at this point in the history
Fix unclosed session
  • Loading branch information
davidjgonzalez committed Oct 15, 2015
2 parents c9146c4 + d21d080 commit d85da43
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void preprocess(final ReplicationAction replicationAction,
// To prevent Replication from happening, throw a ReplicationException
throw new ReplicationException(e);
} finally {
if (resourceResolver == null) {
if (resourceResolver != null && resourceResolver.isLive()) {
// Always close resource resolver you open
resourceResolver.close();
}
Expand Down

0 comments on commit d85da43

Please sign in to comment.