Fix Windows multi-interface compatibility issues#61
Open
PulzWave wants to merge 1 commit intoJaxc:BeatInfo_implementationfrom
Open
Fix Windows multi-interface compatibility issues#61PulzWave wants to merge 1 commit intoJaxc:BeatInfo_implementationfrom
PulzWave wants to merge 1 commit intoJaxc:BeatInfo_implementationfrom
Conversation
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit addresses several issues that break device discovery on Windows systems with multiple network interfaces (especially APIPA 169.254.x.x addresses):
send_discovery_frame(): Wrap socket operations in try/except to handle bind failures gracefully. Windows throws WinError 10049 on APIPA addresses.
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.
_stop(): Removed exception re-raise during shutdown to prevent unhandled exceptions.
_discover_stagelinq_device(): Return error code instead of raising exception when socket bind fails. This allows discovery to continue on other interfaces.
_py_stagelinq_strapper(): Fixed to iterate through target_interfaces list instead of calling _discover_stagelinq_device with empty string.
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).