Catch rejections in socket

This commit is contained in:
Jonathan Staab
2023-03-29 10:37:24 -05:00
parent dc6defdf61
commit ddcc926fa6
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "paravel",
"version": "0.1.9",
"version": "0.1.10",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "paravel",
"version": "0.1.9",
"version": "0.1.10",
"license": "MIT",
"dependencies": {
"husky": "^8.0.3",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "paravel",
"version": "0.1.9",
"version": "0.1.10",
"description": "Yet another toolkit for nostr",
"repository": {
"type": "git",
+1 -1
View File
@@ -77,7 +77,7 @@ export class Socket {
const ws = this.ws
// Avoid "WebSocket was closed before the connection was established"
this.ready.then(() => ws.close())
this.ready.then(() => ws.close(), () => null)
this.ws.removeEventListener("open", this._onOpen)
this.ws.removeEventListener("message", this._onMessage)