Skip to content

Commit

Permalink
Merge pull request #3709 from EventStore/timothycoleman/remove-extra-…
Browse files Browse the repository at this point in the history
…iodispatcher

Remove an instance of IODispatcher that doesn't do anything
  • Loading branch information
tambeau committed Jan 31, 2023
2 parents c577461 + 7bead31 commit 604fbb0
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 604fbb0

Please sign in to comment.