mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
specify websocket error as close reason when no message is available.
fixes https://github.com/nbd-wtf/nostr-tools/issues/411
This commit is contained in:
@@ -98,7 +98,7 @@ export class AbstractRelay {
|
||||
}
|
||||
|
||||
this.ws.onerror = ev => {
|
||||
reject((ev as any).message)
|
||||
reject((ev as any).message || 'websocket error')
|
||||
if (this._connected) {
|
||||
this._connected = false
|
||||
this.connectionPromise = undefined
|
||||
|
||||
Reference in New Issue
Block a user