coder / coder/websocket

Firefox: `CloseNow` returns "A parameter or an operation is not supported by the underlying object"

Open
#478 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
5.5k
Forks
372
PR merge metrics
No merged PRs in 30d

Description

Hi there, I noticed in Firefox WASM calling `CloseNow` returns an error:

> A parameter or an operation is not supported by the underlying object

This can be fixed by instead calling `Close(websocket.StatusNormalClosure, "some reason")`.

Since `CloseNow` is just an alias for `Close(websocket.StatusGoingAway, "")` my guess is that the empty reason value is being rejected by the browser,

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.