Skip to content

fix(wasm): release Web Serial locks on close - #956

Merged
HaoboGu merged 1 commit into
feat/rynk_protocolfrom
agent/pr848-webserial-close
Jul 15, 2026
Merged

fix(wasm): release Web Serial locks on close#956
HaoboGu merged 1 commit into
feat/rynk_protocolfrom
agent/pr848-webserial-close

Conversation

@HaoboGu

@HaoboGu HaoboGu commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

What

Release the Web Serial reader and writer locks before closing the port.

Why

Normal demo disconnect and reconnect attempts can reach port.close() while both streams are still locked. The Web Serial specification requires those locks to be released before the port can close.

Root cause

cancel() and abort() settle the streams but do not release their reader/writer locks.

Impact

The demo can close and reconnect a serial device cleanly. Transport protocol behavior is unchanged.

Checks

  • Exercised the actual link() implementation with standard Web Streams and a port that rejects close while locked.
  • Extracted module passes node --input-type=module --check.

Built on #848.

@HaoboGu
HaoboGu marked this pull request as ready for review July 15, 2026 15:57
@HaoboGu
HaoboGu merged commit 3394c73 into feat/rynk_protocol Jul 15, 2026
@HaoboGu
HaoboGu deleted the agent/pr848-webserial-close branch July 16, 2026 02:20
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