diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2022-06-29 14:58:17 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-06-30 14:45:31 +0200 |
commit | 035e0e23f251fdb766a6630509bcf342efb8b3ad (patch) | |
tree | 3d31ceb62a230b1eba7ba870544e0af25b0db86b /org.eclipse.jgit.http.server | |
parent | ca6b518432b979e96312ccec99cc232c78225976 (diff) | |
download | jgit-035e0e23f251fdb766a6630509bcf342efb8b3ad.tar.gz jgit-035e0e23f251fdb766a6630509bcf342efb8b3ad.zip |
UploadPack: don't prematurely terminate timer in case of error
In uploadWithExceptionPropagation don't prematurely terminate timer in
case of error to enable reporting it to the client. Expose a close
method so that callers can terminate it at the appropriate time.
If the timer is already terminated when trying to report it to the
client this failed with the error java.lang.IllegalStateException:
"Timer already terminated".
Bug: 579670
Change-Id: I95827442ccb0f9b1ede83630cf7c51cf619c399a
Diffstat (limited to 'org.eclipse.jgit.http.server')
-rw-r--r-- | org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java index 2759b8a0fe..c4f845e52b 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java @@ -195,6 +195,8 @@ class UploadPackServlet extends HttpServlet { log(up.getRepository(), e.getCause()); consumeRequestBody(req); out.close(); + } finally { + up.close(); } }; |