I am trying to unsubscribe from the stream using subscription handler Stop method:
EventStoreCatchUpSubscription subscription = null;
subscription = connection.SubscribeToStreamFrom(stream, position, false, (s, e) =>
{
if (IsTheOne(e))
{
DoSomething(e);
try {
subscription.Stop(TimeSpan.FromSeconds(30));
} catch (Exception exc) {
Log(exc);
}
}
});
But every time after the wait timer elapses in Stop method i receive ‘System.TimeoutException: Couldn’t stop EventStoreStreamCatchUpSubscription in time’. What am I doing wrong?