Skip to content

Retrying SeqConnection.Events.ListAsync after WebException results in TaskCanceledException #59

Description

@mwelsh1118

I am querying Seq via the API like this:

var connection = new SeqConnection("myuri");
var items = await connection.Events.ListAsync(filter: "myfilter", fromDateUtc: DateTime.UtcNow - TimeSpan.FromDays(7), count: int.MaxValue);

Rarely, the ListAsync() call will fail (always with a WebException). I am catching WebExceptions and retrying in this case (using the Polly library & exponential backoff). However, the second call seems to always fail with a TaskCanceledException from ListAsync(). I thought maybe the SeqConnection was caching the result and returning me a canceled task from the previous call, but now I'm creating a new SeqConnection for each retry and I still hit the TaskCanceledException.

I am using version 4.2.2 of the Seq.Api NuGet package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions