fix: ignore close reasons from nostr-tools
This commit is contained in:
parent
9267458bca
commit
b73b3512f3
1 changed files with 13 additions and 1 deletions
|
|
@ -190,7 +190,19 @@ const NoteList = forwardRef(
|
|||
},
|
||||
onClose: (url, reason) => {
|
||||
if (!showRelayCloseReason) return
|
||||
if (reason === 'closed by caller') return
|
||||
// ignore reasons from nostr-tools
|
||||
if (
|
||||
[
|
||||
'closed by caller',
|
||||
'relay connection errored',
|
||||
'relay connection closed',
|
||||
'pingpong timed out',
|
||||
'relay connection closed by us'
|
||||
].includes(reason)
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
||||
toast.error(`${url}: ${reason}`)
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue