Skip to content

Fix Windows multi-interface compatibility issues#65

Merged
github-actions[bot] merged 2 commits intomainfrom
windows-fix-main
Mar 1, 2026
Merged

Fix Windows multi-interface compatibility issues#65
github-actions[bot] merged 2 commits intomainfrom
windows-fix-main

Conversation

@Jaxc
Copy link
Owner

@Jaxc Jaxc commented Feb 28, 2026

This commit addresses several issues that break device discovery on Windows systems with multiple network interfaces (especially APIPA 169.254.x.x addresses):

  1. send_discovery_frame(): Wrap socket operations in try/except to handle bind failures gracefully. Windows throws WinError 10049 on APIPA addresses.

  2. send_desc_on_all_if(): Changed from requiring ALL interfaces to send 3+ messages to requiring ANY working interface. With failing APIPA interfaces, the original logic never returned True.

  3. _stop(): Removed exception re-raise during shutdown to prevent unhandled exceptions.

  4. _discover_stagelinq_device(): Return error code instead of raising exception when socket bind fails. This allows discovery to continue on other interfaces.

  5. _py_stagelinq_strapper(): Fixed to iterate through target_interfaces list instead of calling _discover_stagelinq_device with empty string.

  6. Added interface logging in init for easier debugging.

Tested on Windows 11 with Denon DJ Prime 4+ and 6 network interfaces (including 2 APIPA addresses).

This commit addresses several issues that break device discovery on Windows systems with multiple network interfaces (especially APIPA 169.254.x.x addresses):

1. **send_discovery_frame()**: Wrap socket operations in try/except to handle bind failures gracefully. Windows throws WinError 10049 on APIPA addresses.

2. **send_desc_on_all_if()**: Changed from requiring ALL interfaces to send 3+ messages to requiring ANY working interface. With failing APIPA interfaces, the original logic never returned True.

3. **_stop()**: Removed exception re-raise during shutdown to prevent unhandled exceptions.

4. **_discover_stagelinq_device()**: Return error code instead of raising exception when socket bind fails. This allows discovery to continue on other interfaces.

5. **_py_stagelinq_strapper()**: Fixed to iterate through target_interfaces list instead of calling _discover_stagelinq_device with empty string.

6. Added interface logging in __init__ for easier debugging.

Tested on Windows 11 with Denon DJ Prime 4+ and 6 network interfaces (including 2 APIPA addresses).
@Jaxc Jaxc force-pushed the windows-fix-main branch 3 times, most recently from f439052 to 45ee23a Compare March 1, 2026 13:31
@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2494724) to head (e2eaa58).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #65   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          693       699    +6     
  Branches       105       108    +3     
=========================================
+ Hits           693       699    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jaxc Jaxc force-pushed the windows-fix-main branch 2 times, most recently from 8ec9b3a to 141a8f5 Compare March 1, 2026 13:36
Linux cannot receive broadcasts if IP is bound to
the host IP
@Jaxc Jaxc force-pushed the windows-fix-main branch from 141a8f5 to e2eaa58 Compare March 1, 2026 13:37
@Jaxc
Copy link
Owner Author

Jaxc commented Mar 1, 2026

/fast-forward

@github-actions github-actions bot merged commit e2eaa58 into main Mar 1, 2026
9 checks passed
@github-actions github-actions bot deleted the windows-fix-main branch March 1, 2026 13:40
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.

1 participant