summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-03-19 12:08:00 -0400
committerJames Moger <james.moger@gitblit.com>2014-04-10 18:58:09 -0400
commit3a4a9886f829594d64b0ccb89813c684f406325d (patch)
tree413014f839b85a52a70e75ae248a09bf82303994 /src
parent8b87994373f018fe8a7b092831ad6f6bdca1ad6e (diff)
downloadgitblit-3a4a9886f829594d64b0ccb89813c684f406325d.tar.gz
gitblit-3a4a9886f829594d64b0ccb89813c684f406325d.zip
Clear instantiated commands and dispatchers from the dispatcher on destroy()
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/gitblit/transport/ssh/commands/DispatchCommand.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/transport/ssh/commands/DispatchCommand.java b/src/main/java/com/gitblit/transport/ssh/commands/DispatchCommand.java
index 00b79ffe..2e874e61 100644
--- a/src/main/java/com/gitblit/transport/ssh/commands/DispatchCommand.java
+++ b/src/main/java/com/gitblit/transport/ssh/commands/DispatchCommand.java
@@ -69,9 +69,12 @@ public abstract class DispatchCommand extends BaseCommand implements ExtensionPo
for (BaseCommand command : instantiated) {
command.destroy();
}
+ instantiated.clear();
+
for (DispatchCommand dispatcher : dispatchers.values()) {
dispatcher.destroy();
}
+ dispatchers.clear();
}
protected void registerDispatcher(UserModel user, Class<? extends DispatchCommand> cmd) {