diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-19 12:08:00 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-10 18:58:09 -0400 |
commit | 3a4a9886f829594d64b0ccb89813c684f406325d (patch) | |
tree | 413014f839b85a52a70e75ae248a09bf82303994 /src | |
parent | 8b87994373f018fe8a7b092831ad6f6bdca1ad6e (diff) | |
download | gitblit-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.java | 3 |
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) { |