summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/gitblit/servlet/PagesServlet.java5
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();
}
}