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 ef359121b..62601915e 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 @@ -136,6 +136,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; } }