]> source.dussan.org Git - gitblit.git/commitdiff
Clear instantiated commands and dispatchers from the dispatcher on destroy()
authorJames Moger <james.moger@gitblit.com>
Wed, 19 Mar 2014 16:08:00 +0000 (12:08 -0400)
committerJames Moger <james.moger@gitblit.com>
Thu, 10 Apr 2014 22:58:09 +0000 (18:58 -0400)
src/main/java/com/gitblit/transport/ssh/commands/DispatchCommand.java

index 00b79ffe05fee5288f0015d663b71c19b1e3fd41..2e874e617785fa22f0a8ec3b87c6d357727031e2 100644 (file)
@@ -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) {