diff --git a/abstract-relay.ts b/abstract-relay.ts index be1af80..8db80e0 100644 --- a/abstract-relay.ts +++ b/abstract-relay.ts @@ -180,6 +180,7 @@ export class AbstractRelay { if (this.reconnectAttempts === 0) { this.skipReconnection = true } + this.ws?.close?.() this.handleHardClose('relay connection timed out') }, opts.timeout) } @@ -236,6 +237,7 @@ export class AbstractRelay { if (this.reconnectAttempts === 0) { this.skipReconnection = true } + this.ws?.close?.() this.handleHardClose('relay connection failed') } diff --git a/jsr.json b/jsr.json index f133628..3448866 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@nostr/tools", - "version": "2.25.1", + "version": "2.25.2", "exports": { ".": "./index.ts", "./core": "./core.ts", diff --git a/package.json b/package.json index 6d43f53..d91df9c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "nostr-tools", - "version": "2.25.1", + "version": "2.25.2", "description": "Tools for making a Nostr client.", "repository": { "type": "git",