Skip to content

Fix Windows multi-interface compatibility issues#61

Open
PulzWave wants to merge 1 commit intoJaxc:BeatInfo_implementationfrom
PulzWave:fix/windows-multi-interface-compatibility
Open

Fix Windows multi-interface compatibility issues#61
PulzWave wants to merge 1 commit intoJaxc:BeatInfo_implementationfrom
PulzWave:fix/windows-multi-interface-compatibility

Conversation

@PulzWave
Copy link

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).
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