vmeretail / subscriptionservice

Lightweight and easy to use library, which allows you to manage you delivering events from persistent subscriptions.
12 stars 0 forks source link

CancellationToken not being marked during a connection problem #135

Open StevenBlair123 opened 4 years ago

StevenBlair123 commented 4 years ago

Describe the bug Running the subscription service in our own hosting prcoess, and the eventstore conenction was destroyed (after 10 reconnects). The CancellationToken passed into the .Start method:

await this.SubscriptionService.Start(subscriptions, stoppingToken);

Is not set to cancel, therefore, our hosting loop continues on when there is no chance of this returning to a working state.

To Reproduce Steps to reproduce the behavior:

  1. Pick an eventstore url which is not running.
  2. Start the service and let it attempt it's reconencts (default is 10)

Expected behavior At the very least, our service should be indicating there has been a problem to the hosting process. Just now, our hosting process has a try catch, but has no way to know if the task itself should be cancelled.

Additional context

This is using version 1.0.1 of the subscription service.