diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-23 12:55:45 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-23 12:55:45 -0400 |
commit | 1ec2baa39d5a55585937ea33771a97014ca4b051 (patch) | |
tree | b8ff331e839cb1135c05a7b0e45c274f21d2efe8 | |
parent | a1e3468671697a69d578566ca256e02c4a67ce34 (diff) | |
download | gitblit-1ec2baa39d5a55585937ea33771a97014ca4b051.tar.gz gitblit-1ec2baa39d5a55585937ea33771a97014ca4b051.zip |
Ensure repository is closed after processing a pages request
-rw-r--r-- | src/main/java/com/gitblit/servlet/PagesServlet.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/servlet/PagesServlet.java b/src/main/java/com/gitblit/servlet/PagesServlet.java index 1d767def..7e48f8e2 100644 --- a/src/main/java/com/gitblit/servlet/PagesServlet.java +++ b/src/main/java/com/gitblit/servlet/PagesServlet.java @@ -157,7 +157,6 @@ public class PagesServlet extends DaggerServlet { "# Error\nSorry, the repository {0} does not have a **gh-pages** branch!",
repository);
error(response, mkd);
- r.close();
return;
}
@@ -309,10 +308,10 @@ public class PagesServlet extends DaggerServlet { logger.error("Failed to write page to client", t);
}
- // close the repository
- r.close();
} catch (Throwable t) {
logger.error("Failed to write page to client", t);
+ } finally {
+ r.close();
}
}
|