Skip to content

Commit

Permalink
Merge pull request #3723 from EventStore/cherry-pick/3709/timothycole…
Browse files Browse the repository at this point in the history
…man/remove-extra-iodispatcher-release/oss-v22.10

[release/oss-v22.10] Remove an instance of IODispatcher that doesn't do anything
  • Loading branch information
hayley-jean committed Feb 7, 2023
2 parents 488aa21 + a0b9956 commit 4325b4b
Showing 1 changed file with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public class InternalAuthenticationProviderFactory : IAuthenticationProviderFact
new PublishEnvelope(components.WorkersQueue, crossThread: true));

foreach (var bus in components.WorkerBuses) {
bus.Subscribe(_dispatcher.ForwardReader);
bus.Subscribe<ClientMessage.ReadStreamEventsForwardCompleted>(_dispatcher.ForwardReader);
bus.Subscribe<ClientMessage.ReadStreamEventsBackwardCompleted>(_dispatcher.BackwardReader);
bus.Subscribe<ClientMessage.NotHandled>(_dispatcher.BackwardReader);
bus.Subscribe(_dispatcher.Writer);
bus.Subscribe(_dispatcher.StreamDeleter);
bus.Subscribe(_dispatcher.Awaker);
bus.Subscribe<ClientMessage.WriteEventsCompleted>(_dispatcher.Writer);
bus.Subscribe<ClientMessage.DeleteStreamCompleted>(_dispatcher.StreamDeleter);
bus.Subscribe<IODispatcherDelayedMessage>(_dispatcher.Awaker);
bus.Subscribe<IODispatcherDelayedMessage>(_dispatcher);
bus.Subscribe<ClientMessage.NotHandled>(_dispatcher);
}
Expand All @@ -45,16 +45,6 @@ public class InternalAuthenticationProviderFactory : IAuthenticationProviderFact
_components.MainBus.Subscribe<SystemMessage.BecomeShutdown>(passwordChangeNotificationReader);
_components.MainBus.Subscribe(provider);

var ioDispatcher = new IODispatcher(_components.MainQueue, new PublishEnvelope(_components.MainQueue));
_components.MainBus.Subscribe<ClientMessage.ReadStreamEventsBackwardCompleted>(ioDispatcher.BackwardReader);
_components.MainBus.Subscribe<ClientMessage.NotHandled>(ioDispatcher.BackwardReader);
_components.MainBus.Subscribe(ioDispatcher.ForwardReader);
_components.MainBus.Subscribe(ioDispatcher.Writer);
_components.MainBus.Subscribe(ioDispatcher.StreamDeleter);
_components.MainBus.Subscribe(ioDispatcher.Awaker);
_components.MainBus.Subscribe<IODispatcherDelayedMessage>(_dispatcher);
_components.MainBus.Subscribe<ClientMessage.NotHandled>(_dispatcher);

return provider;
}
}
Expand Down

0 comments on commit 4325b4b

Please sign in to comment.