mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-09-13 22:05:07 +00:00
close socket from failed connect.
fixes https://github.com/nbd-wtf/nostr-tools/issues/550
This commit is contained in:
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nostr/tools",
|
||||
"version": "2.25.1",
|
||||
"version": "2.25.2",
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./core": "./core.ts",
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user