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:
parent
f8c3e20f3d
commit
753ff323ea
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue