Catch rejections in socket
This commit is contained in:
Generated
+2
-2
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user