Compare commits

...

1 Commits

Author SHA1 Message Date
fiatjaf
de26ee98c5 failed to connect to a websocket should reject the promise. 2025-05-31 11:16:22 -03:00
3 changed files with 5 additions and 3 deletions

View File

@@ -112,7 +112,9 @@ export class AbstractRelay {
}
}
this.ws.onclose = async () => {
this.ws.onclose = (ev) => {
clearTimeout(this.connectionTimeoutHandle)
reject((ev as any).message || 'websocket closed')
if (this._connected) {
this._connected = false
this.connectionPromise = undefined

View File

@@ -1,6 +1,6 @@
{
"name": "@nostr/tools",
"version": "2.13.1",
"version": "2.13.2",
"exports": {
".": "./index.ts",
"./core": "./core.ts",

View File

@@ -1,7 +1,7 @@
{
"type": "module",
"name": "nostr-tools",
"version": "2.13.1",
"version": "2.13.2",
"description": "Tools for making a Nostr client.",
"repository": {
"type": "git",