Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ws_js: return c.closeErr when closed during read#505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
joshuasing wants to merge1 commit intocoder:master
base:master
Choose a base branch
Loading
fromhemilabs:joshua/fix-wasm-close-err

Conversation

joshuasing
Copy link

Return the close error when the WebSocket is closed (when running in WASM).

Previously, when the WebSocket connection is closed by the server,Read always returnsnet.ErrClosed, which prevents the correct handling of a close error with certain close status codes.

This might not be the best way to fix this, however we have been using this patch in production since June and it appears to resolve the issue and makes it possible to implement logic depending on the close code.

shynome and jalius reacted with heart emoji
@joshuasing
Copy link
Author

I am unable to reproduce the test failure locally (when runningCI=1 go test ./... to actually run the WASM tests, and adding debug logs to make sure the test is actually running):

> CI=1 go test ./... -v -run TestWasm?       github.com/coder/websocket/internal/bpool       [no test files]?       github.com/coder/websocket/internal/errd        [no test files]?       github.com/coder/websocket/internal/test        [no test files]?       github.com/coder/websocket/internal/test/assert [no test files]?       github.com/coder/websocket/internal/test/wstest [no test files]?       github.com/coder/websocket/internal/test/xrand  [no test files]?       github.com/coder/websocket/internal/util        [no test files]=== RUN   TestWasm=== PAUSE TestWasm=== CONT  TestWasm    conn_test.go:367: Running WASM tests # <- debug log inside TestWasm--- PASS: TestWasm (8.10s)PASSok      github.com/coder/websocket      8.969stesting: warning: no tests to runPASSok      github.com/coder/websocket/internal/xsync       (cached) [no tests to run]testing: warning: no tests to runPASSok      github.com/coder/websocket/wsjson       (cached) [no tests to run]

It looks like a possible issue starting Chrome in CI?https://github.com/coder/websocket/pull/505/checks#step:4:102

@joshuasing
Copy link
Author

According to an announcement from GitHub,ubuntu-latest started switching to Ubuntu 24.04 on December 5th:actions/runner-images#10636
Ubuntu 24.04 uses more strict AppArmor policies which may have broken (or now requires) sandboxing for Chrome?

The runner executed with Ubuntu 24.04.1:https://github.com/coder/websocket/pull/505/checks#step:1:4

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@joshuasing

[8]ページ先頭

©2009-2025 Movatter.jp