Skip to content

Prevent blocking when remote is not reachable#89

Open
Seneral wants to merge 1 commit intohoijui:masterfrom
Seneral:master
Open

Prevent blocking when remote is not reachable#89
Seneral wants to merge 1 commit intohoijui:masterfrom
Seneral:master

Conversation

@Seneral
Copy link
Copy Markdown

@Seneral Seneral commented Apr 28, 2026

This PR configures OSCPortOut (using connect function) using UDP to never block
This happens on e.g. linux, blocking for up to 3s when remote is unreachable while the system tries to reach the target
In the spirit of UDP "send and forget", it should be non-blocking
Any packets may be queued by OS or dropped, we don't care

A lot of applications will not be written to handle this because it really only happens when it is misconfigured or used in non-operating conditions, and can thus cause undesired behaviour like freezing

Configured OSCPortOut using UDP to never block
This happens on e.g. linux, blocking for up to 3s when remote is unreachable
In the spirit of UDP "send and forget", it should be non-blocking
Any packets may be queued by OS or dropped, we don't care
@Seneral
Copy link
Copy Markdown
Author

Seneral commented May 5, 2026

In case there are concerns with backwards-compatibility, I've made a separate branch that simply exposes configureBlocking, requiring applications to opt-in to this change:
https://github.com/Seneral/JavaOSC/tree/configure-blocking

One of these changes, perhaps both, is very much desired though. Thank you!

Seneral added a commit to Seneral/SlimeVR-Server that referenced this pull request May 6, 2026
This freezes the whole server when target is unreachable
Observed on Linux with freezes of 3s with every send

This requires a patch to JavaOSC and thus upstream cooperation:
hoijui/JavaOSC#89
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