From 3a4a9886f829594d64b0ccb89813c684f406325d Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 19 Mar 2014 12:08:00 -0400 Subject: [PATCH] Clear instantiated commands and dispatchers from the dispatcher on destroy() --- .../com/gitblit/transport/ssh/commands/DispatchCommand.java | 3 +++ 1 file changed, 3 insertions(+) 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 cmd) { -- 2.39.5