summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/articles/LettingTheUserDownloadAFile.asciidoc11
1 files changed, 9 insertions, 2 deletions
diff --git a/documentation/articles/LettingTheUserDownloadAFile.asciidoc b/documentation/articles/LettingTheUserDownloadAFile.asciidoc
index f977b07956..1ede8bd5c0 100644
--- a/documentation/articles/LettingTheUserDownloadAFile.asciidoc
+++ b/documentation/articles/LettingTheUserDownloadAFile.asciidoc
@@ -104,8 +104,15 @@ public class OnDemandFileDownloader extends FileDownloader {
return super.handleConnectorRequest(request, response, path);
}
- private StreamResource getResource () {
- return (StreamResource) this.getResource("dl");
+ private StreamResource getResource() {
+ StreamResource result = null;
+ this.getSession().lock();
+ try {
+ result = (StreamResource) this.getResource("dl");
+ } finally {
+ this.getSession().unlock();
+ }
+ return result;
}
}
....