Skip to content

Missing comments: magic number 15 (buffer seconds) used in 5+ locations without explanation #435

@Christophe-Rogiers

Description

@Christophe-Rogiers

Description

The value 15 appears as a timeout buffer in at least 5 locations without a named constant or comment explaining why 15 seconds was chosen:

  • src/Servy.Core/Helpers/ServiceHelper.cs:65-66
  • src/Servy.Core/Services/ServiceManager.cs:413,631,662

Similarly, 101 graph points in PerformanceViewModel.cs:207,353 and WaitChunkMs/ScmAdditionalTimeMs static fields in Service.cs:79,87-88 lack explanation.

Suggested fix

Define as named constants with explanatory comments:

/// <summary>Extra buffer to ensure SCM doesn't kill the service before cleanup finishes.</summary>
private const int ScmTimeoutBufferSeconds = 15;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions