mirror of
https://github.com/joinmarket-webui/jam.git
synced 2026-08-17 13:07:34 +02:00
fix: use 1000 as websocket close code (#219)
Firefox throws a `DOMException` when using `1001` as close code: `A parameter or an operation is not supported by the underlying object`. Cannot really find out why this is, but in this case it does not really matter, as the code only runs if there is no connection in the first place.
This commit is contained in:
parent
825f725053
commit
6e3ebf019b
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ const WebsocketProvider = ({ children }) => {
|
|||
needsForceClose
|
||||
)
|
||||
if (needsForceClose) {
|
||||
websocket.close(1001, 'Force-close pending connection')
|
||||
websocket.close(1000, 'Force-close pending connection')
|
||||
}
|
||||
}, WEBSOCKET_ESTABLISH_CONNECTION_MAX_DURATION)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue