Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added handling of TaskCanceledException for all occurrences of HttpClient #13

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/NET-Core/Clients/Asset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ private void Init()
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}

return null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/NET-Core/Clients/Current.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ public Current(string baseUrl, string deviceName, string path, long atSequence)
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}

return null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/NET-Core/Clients/Probe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public Probe(string baseUrl, string deviceName)
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}

return null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/NET-Core/Clients/Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ private void Init()
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}

return null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/NET-Core/Clients/Stream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public async Task Run()
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}
}

Stopped?.Invoke();
Expand Down
4 changes: 4 additions & 0 deletions src/NET-Standard/Clients/Asset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ private void Init()
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}

return null;
}
Expand Down
5 changes: 4 additions & 1 deletion src/NET-Standard/Clients/Current.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ public Current(string baseUrl, string deviceName, string path, long atSequence)
{
ConnectionError?.Invoke(e);
}

catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}
return null;
}

Expand Down
4 changes: 4 additions & 0 deletions src/NET-Standard/Clients/Probe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public Probe(string baseUrl, string deviceName)
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}

return null;
}
Expand Down
5 changes: 4 additions & 1 deletion src/NET-Standard/Clients/Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ private void Init()
{
ConnectionError?.Invoke(e);
}

catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}
return null;
}

Expand Down
4 changes: 4 additions & 0 deletions src/NET-Standard/Clients/Stream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public async Task Run()
{
ConnectionError?.Invoke(e);
}
catch (TaskCanceledException ex)
{
ConnectionError?.Invoke(ex);
}
}

Stopped?.Invoke();
Expand Down