Even with cancellation token, it seems that it's not always possible to abort the connection in the clean way, pointless to throw on them since there is nothing else we can do.
- Add guard against cancellationToken being null
- Use cancellationToken for all webSocket operations
- Use no cancellation token for semaphore release
- Log TaskCanceledException on user-debugging level
@JustArchiNET/asf-ui-dev Summary of changes:
Old:
- GET GitHub/Releases is rip (rewritten)
- GET GitHub/Releases/{version:required} is rip (renamed)
New:
- GET GitHub/Release, returns the most recent release (can be pre, can be stable)
- GET GitHub/Release/{version:required}, works like before, but also accepts "latest" as version for fetching latest stable release.
Expected usage:
- GET GitHub/Release for fetching most recent release
- If release equals user release, don't do anything more and save requests, display changelog
- Check if the release you fetched is stable, if yes, skip the extra request, otherwise, GET GitHub/Release/latest for latest stable.
- If stable release equals user's release, don't do anything more and save request, show both changelogs (pre and stable)
- Otherwise, decide if you want to also GET GitHub/Release/{userVersion} for that specific release.
Adapt appropriately for usage (I'd recommend to check if user has enabled pre-releases in the first place, because if he's on stable channel then likely you shouldn't display him pre-release changelogs at all, and skip the first request).
If in doubt, check swagger doc.