diff options
author | David Ostrovsky <david@ostrovsky.org> | 2018-09-25 08:20:57 +0200 |
---|---|---|
committer | David Ostrovsky <d.ostrovsky@gmx.de> | 2018-09-25 03:31:41 -0500 |
commit | e5a4c0d17e532824e0d379cb1c322296b07c73f9 (patch) | |
tree | 4aaf9fe71ccafa5673a0127e2386992690347482 /org.eclipse.jgit.lfs.server | |
parent | 0de8e1e65cdc5c87acad672b96df71122e3c8886 (diff) | |
download | jgit-e5a4c0d17e532824e0d379cb1c322296b07c73f9.tar.gz jgit-e5a4c0d17e532824e0d379cb1c322296b07c73f9.zip |
ObjectDownloadListener#onWritePossible: Add comment on return statement
It is not obvious why this return statement is needed. Clarify with a
comment that otherwise endless loop may show up when recent versions
of Jetty are used.
Change-Id: I8e5d4de51869fb1179bf599bfb81bcd7d745874b
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
Diffstat (limited to 'org.eclipse.jgit.lfs.server')
-rw-r--r-- | org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java index 60258602f1..2dc9493f3f 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java @@ -134,6 +134,10 @@ public class ObjectDownloadListener implements WriteListener { } finally { context.complete(); } + // This is need to avoid endless loop in recent Jetty versions. + // That's because out.isReady() is returning true for already + // closed streams and because out.close() doesn't throw any + // exception any more when trying to close already closed stream. return; } } |