Skip to content

Skip the plugin list request once the server leaves it unanswered - #97

Merged
jath03 merged 3 commits into
jath03:masterfrom
PilaScat:fix/skip-unanswered-plugin-list
Oct 8, 2026
Merged

jath03 merged 3 commits into
jath03:masterfrom
PilaScat:fix/skip-unanswered-plugin-list

Conversation

@PilaScat

@PilaScat PilaScat commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #94 and the 0.3.7 hotfix.

Problem

OpenRGB 1.0 in server mode accepts REQUEST_PLUGIN_LIST and never answers. Since 0.3.7, update_plugins() recovers by waiting for the 10 s socket timeout and reconnecting. It does this on every update(), so every update takes about 10 s even though devices and profiles answer in under half a second.

This matters for clients that poll. The Home Assistant openrgb integration (which ships 0.3.7 since 2026.10) calls update() every 15 s while holding a lock. The connection is busy about 10.5 s out of every 25 s, so a profile change or light command waits up to 10 s in the queue.

Change

OpenRGBClient remembers that the plugin list request timed out (plugin_list_unanswered) and skips it on later updates of the same client. Only a timeout sets the flag. If the connection drops during the request (OpenRGBDisconnected without a timeout cause), the request is retried on the next update as before.

Testing

Against a real OpenRGB 1.0 service on Windows (8 devices, protocol 4 negotiated), from the Home Assistant container:

connect update() ×3
0.3.7 10.9 s 10.5 s each
this branch 10.9 s 0.42 / 0.38 / 0.37 s

Against a minimal fake SDK server:

  • silent on REQUEST_PLUGIN_LIST: the first connect still takes 10 s, then updates take 0.00 s and the flag is True;
  • answering the plugin list: everything takes 0.00 s and the flag stays False;
  • closing the connection on the request: the flag stays False.

flake8 (CI selection) and mypy give the same results as on master.

The first connection still pays the 10 s once. Avoiding that would need either a shorter timeout for this one request or a server-side fix.

🤖 Generated with Claude Code

OpenRGB 1.0 in server mode accepts REQUEST_PLUGIN_LIST and never replies
(jath03#94). The hotfix in 0.3.7 recovers by waiting for the 10 s socket timeout
and reconnecting, but it does so on every update(), so each update costs
about 10 s. Clients that poll, such as the Home Assistant integration,
hold their connection for most of the time and queue every command
behind it.

Remember that the request timed out and skip it on later updates of the
same client. Only a timeout sets the flag: a dropped connection still
retries the request on the next update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 8, 2026 01:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 03:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI balanced review requested due to automatic review settings October 8, 2026 03:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@jath03
jath03 merged commit 8651c0d into jath03:master Oct 8, 2026
4 checks passed
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.

3 participants