Skip to content

sdk: restore interrupt flag in sync polling - #26

Open
chayu163 wants to merge 1 commit into
ZSvirt:mainfrom
chayu163:fix/sdk-sync-poll-interrupt
Open

chayu163 wants to merge 1 commit into
ZSvirt:mainfrom
chayu163:fix/sdk-sync-poll-interrupt

Conversation

@chayu163

Copy link
Copy Markdown

What changed

  • In syncPollResult, replace the ignored InterruptedException handler with Thread.currentThread().interrupt()
    followed by throwing ApiException.
  • Normal (non-interrupted) polling path is unchanged.

Fixes #25

@zsphere-opensource

Copy link
Copy Markdown
Contributor

Thanks for reporting this and submitting the fix!
Restoring the interrupt flag and propagating the interruption as an ApiException looks appropriate here, allowing synchronous polling to stop when interrupted.
We’ll review and validate this through our internal GitLab workflow, checking that interruption stops polling promptly, preserves the interrupt status, and leaves normal polling behavior unchanged.
Once accepted internally and synchronized to GitHub, we’ll share the public commit link here and preserve your authorship. If the PR is not automatically marked as merged, we’ll close it with the merged-internal label.

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.

[ZSvirt] bug: SDK sync polling swallows thread interruption

2 participants