mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-10-05 14:38:23 +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) {
|
if (this.reconnectAttempts === 0) {
|
||||||
this.skipReconnection = true
|
this.skipReconnection = true
|
||||||
}
|
}
|
||||||
|
this.ws?.close?.()
|
||||||
this.handleHardClose('relay connection timed out')
|
this.handleHardClose('relay connection timed out')
|
||||||
}, opts.timeout)
|
}, opts.timeout)
|
||||||
}
|
}
|
||||||
@@ -236,6 +237,7 @@ export class AbstractRelay {
|
|||||||
if (this.reconnectAttempts === 0) {
|
if (this.reconnectAttempts === 0) {
|
||||||
this.skipReconnection = true
|
this.skipReconnection = true
|
||||||
}
|
}
|
||||||
|
this.ws?.close?.()
|
||||||
this.handleHardClose('relay connection failed')
|
this.handleHardClose('relay connection failed')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nostr/tools",
|
"name": "@nostr/tools",
|
||||||
"version": "2.25.1",
|
"version": "2.25.2",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./index.ts",
|
".": "./index.ts",
|
||||||
"./core": "./core.ts",
|
"./core": "./core.ts",
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "2.25.1",
|
"version": "2.25.2",
|
||||||
"description": "Tools for making a Nostr client.",
|
"description": "Tools for making a Nostr client.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user