Skip to content

Conversation

@BornToBeRoot
Copy link
Owner

Changes proposed in this pull request

  • Fix race condition on host / port scanned. Scan is completed (Result == 0), but Hosts is up, but not added
  • Use ScanComplete in UI Thread with lower prio

Related issue(s)

Copilot generated summary

Provide a Copilot generated summary of the changes in this pull request.

Copilot summary

This pull request makes improvements to the scan completion logic in both the IP scanner and port scanner view models to ensure UI updates occur in the correct order and with appropriate thread priority. It also updates the IP range detection logic to use a configurable public IP address. The most important changes are grouped below.

UI Threading and Scan Completion Ordering:

  • In both IPScannerViewModel.cs and PortScannerViewModel.cs, the ScanComplete event handler now runs on the UI thread with DispatcherPriority.Background to ensure all scan results are added before updating scan state, preventing race conditions and improving UI consistency. [1] [2] [3] [4]
  • Added comments to clarify the reasoning for the change in dispatcher priority, referencing issue IP Scanner error message is displayed even when host is up #3285 for context. [1] [2]

IP Range Detection Logic:

  • Updated the IP range detection in DetectIPRange() to use GlobalStaticConfiguration.Dashboard_PublicIPv4Address instead of a hardcoded IP address, making the detection logic configurable and more robust.

Minor UI Consistency:

  • Minor formatting change in the HostScanned event handler in IPScannerViewModel.cs for improved readability.

To-Do

Contributing

By submitting this pull request, I confirm the following:

@mergify mergify bot merged commit eb26592 into main Dec 27, 2025
4 checks passed
@mergify mergify bot deleted the fix/3285 branch December 27, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IP Scanner error message is displayed even when host is up

2 participants