Fix connection error, bump versions
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@welshman/net",
|
||||
"version": "0.0.36",
|
||||
"version": "0.0.38",
|
||||
"author": "hodlbod",
|
||||
"license": "MIT",
|
||||
"description": "Utilities for connecting with nostr relays.",
|
||||
|
||||
@@ -55,9 +55,8 @@ export class Socket {
|
||||
}
|
||||
|
||||
// If we're closed due to an error retry after a delay
|
||||
if (Date.now() - this.lastError > 15_000) {
|
||||
if (this.status === Error && Date.now() - this.lastError > 15_000) {
|
||||
this.status = New
|
||||
this.lastError = 0
|
||||
this.cxn.emit(ConnectionEvent.Reset)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user