From: James Moger Date: Wed, 19 Mar 2014 16:08:00 +0000 (-0400) Subject: Clear instantiated commands and dispatchers from the dispatcher on destroy() X-Git-Tag: v1.5.0~68^2~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3a4a9886f829594d64b0ccb89813c684f406325d;p=gitblit.git Clear instantiated commands and dispatchers from the dispatcher on destroy() --- 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) {