From dedded7422306ec2c8543b12de0ebe1854f46185 Mon Sep 17 00:00:00 2001 From: Daniel Stolt Date: Tue, 28 Jul 2015 16:35:51 +0100 Subject: [PATCH] Changed distributed shell restart to only apply to the correct tenant. --- .../Orchard.MessageBus/Services/DistributedShellStarter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.MessageBus/Services/DistributedShellStarter.cs b/src/Orchard.Web/Modules/Orchard.MessageBus/Services/DistributedShellStarter.cs index 97bef5f20..17c6f52ca 100644 --- a/src/Orchard.Web/Modules/Orchard.MessageBus/Services/DistributedShellStarter.cs +++ b/src/Orchard.Web/Modules/Orchard.MessageBus/Services/DistributedShellStarter.cs @@ -24,12 +24,12 @@ namespace Orchard.MessageBus.Services { } public void Activated() { - _messageBus.Subscribe(Channel, (channel, message) => { + _messageBus.Subscribe(Channel, (channel, tenantName) => { // todo: this only handles changed tenants, we should consider handling started and stopped tenants using (var scope = _workContextAccessor.CreateWorkContextScope()) { var shellSettings = scope.Resolve(); - if (shellSettings != null) { + if (shellSettings != null && shellSettings.Name == tenantName) { // todo: this doesn't work as the new tenants list is lost right after var shellSettingsManagerEventHandler = scope.Resolve();