pipeline: catch error on broadcast
This commit is contained in:
parent
7b7cd8b15c
commit
e9d29075eb
|
@ -225,11 +225,15 @@ function streamOut(event: NostrEvent) {
|
||||||
* Publish the event to other relays.
|
* Publish the event to other relays.
|
||||||
* This should only be done in certain circumstances, like mentioning a user or publishing deletions.
|
* This should only be done in certain circumstances, like mentioning a user or publishing deletions.
|
||||||
*/
|
*/
|
||||||
function broadcast(event: DittoEvent, signal: AbortSignal) {
|
async function broadcast(event: DittoEvent, signal: AbortSignal) {
|
||||||
if (!event.user || !isFresh(event)) return;
|
if (!event.user || !isFresh(event)) return;
|
||||||
|
|
||||||
if (event.kind === 5) {
|
if (event.kind === 5) {
|
||||||
client.event(event, { signal });
|
try {
|
||||||
|
await client.event(event, { signal });
|
||||||
|
} catch (e) {
|
||||||
|
debug(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue