Skip to content

Conversation

@JusterZhu
Copy link
Collaborator

Changed DownloadTimeOut option type to nullable int and updated usage to handle null values, allowing more flexible configuration of download timeout settings.

Changed DownloadTimeOut option type to nullable int and updated usage to handle null values, allowing more flexible configuration of download timeout settings.
Copilot AI review requested due to automatic review settings January 7, 2026 02:07
@JusterZhu JusterZhu added the fix Fix some existing issues label Jan 7, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the DownloadTimeOut option type from int to int? (nullable int) to allow more flexible configuration. When no value is provided, the code defaults to 60 seconds using the null-coalescing operator.

Key changes:

  • Changed UpdateOption.DownloadTimeOut from UpdateOption<int> to UpdateOption<int?> to support nullable values
  • Simplified the null-coalescing assignment in GeneralUpdateBootstrap.cs by removing an unnecessary intermediate variable
  • GeneralClientBootstrap.cs was modified but appears to have a critical file encoding issue

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/c#/GeneralUpdate.Common/Internal/Bootstrap/UpdateOption.cs Changed DownloadTimeOut option type from int to int? to support nullable configuration values
src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs Simplified assignment by removing intermediate variable and directly using null-coalescing operator with 60-second default
src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs File has a critical encoding corruption issue with spaces inserted between all characters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

public static readonly UpdateOption<Encoding> Encoding = ValueOf<Encoding>("COMPRESSENCODING");

/// <summary>
/// Timeout period (unit: second). If this parameter is not specified, the default timeout period is 30 seconds.
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states the default timeout period is 30 seconds, but the actual default value used throughout the codebase is 60 seconds. The comment should be updated to match the implementation.

Suggested change
/// Timeout period (unit: second). If this parameter is not specified, the default timeout period is 30 seconds.
/// Timeout period (unit: second). If this parameter is not specified, the default timeout period is 60 seconds.

Copilot uses AI. Check for mistakes.
@JusterZhu JusterZhu merged commit e6c7c0b into master Jan 7, 2026
8 checks passed
@JusterZhu JusterZhu deleted the fix branch January 7, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix some existing issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants