Skip to content

Address code review feedback for War Thunder HTTP polling implementation#15

Merged
codegefluester merged 4 commits intofeat/add-war-thunder-realtime-sourcefrom
copilot/sub-pr-14
Feb 11, 2026
Merged

Address code review feedback for War Thunder HTTP polling implementation#15
codegefluester merged 4 commits intofeat/add-war-thunder-realtime-sourcefrom
copilot/sub-pr-14

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

Resolves 7 code review issues from the War Thunder realtime source PR including broken documentation links, missing using statements, incorrect cancellation handling, and resource disposal issues.

Changes

Cancellation Handling

  • Distinguish between user-initiated cancellation and request timeout in HttpPollingSourceBase
  • User cancellations exit cleanly; timeouts trigger retry logic with exponential backoff
  • Remove redundant TaskCanceledException catch (already handled by OperationCanceledException parent)
catch (OperationCanceledException ex)
{
    if (cancellationToken.IsCancellationRequested)
    {
        // User requested cancellation - exit cleanly
        yield break;
    }
    
    // Timeout from linkedCts - treat as connection error and retry
    _consecutiveErrors++;
    // ... exponential backoff logic
}

Resource Management

  • Add try-catch-finally block to CaptureWarThunderSession matching F1 pattern
  • Properly dispose CancellationTokenSource and unregister event handler in finally block
  • Catch FileNotFoundException and OperationCanceledException with user-friendly messages

Compilation Fixes

  • Add missing System, System.Collections.Generic, and System.Linq using statements to HttpPollingSourceOptions

Documentation

  • Replace broken links to non-existent API_REFERENCE.md and PERFORMANCE.md with "(coming soon)" placeholders

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits February 11, 2026 16:16
Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>
Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>
Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>
Copilot AI changed the title [WIP] Add War Thunder HTTP telemetry integration Address code review feedback for War Thunder HTTP polling implementation Feb 11, 2026
Copilot AI requested a review from codegefluester February 11, 2026 16:24
@codegefluester codegefluester marked this pull request as ready for review February 11, 2026 16:43
@codegefluester codegefluester merged commit f3030d9 into feat/add-war-thunder-realtime-source Feb 11, 2026
@codegefluester codegefluester deleted the copilot/sub-pr-14 branch February 11, 2026 16:44
codegefluester added a commit that referenced this pull request Feb 12, 2026
…ion (#15)

* Initial plan

* Address code review comments

Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>

* Remove redundant TaskCanceledException catch

Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>

* Clarify timeout cancellation comment

Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: codegefluester <203914+codegefluester@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants