mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-31 08:46:16 +00:00
always close relay connections
This commit is contained in:
parent
696ccfaec3
commit
e421c4eda5
1 changed files with 2 additions and 1 deletions
|
@ -70,10 +70,11 @@ class Nostr extends NotificationProvider {
|
||||||
for (let i = eventIndex; i < events.length; i++) {
|
for (let i = eventIndex; i < events.length; i++) {
|
||||||
await relay.publish(events[i]);
|
await relay.publish(events[i]);
|
||||||
}
|
}
|
||||||
relay.close();
|
|
||||||
successfulRelays++;
|
successfulRelays++;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`Failed to publish event to ${relayUrl}:`, error);
|
console.error(`Failed to publish event to ${relayUrl}:`, error);
|
||||||
|
} finally {
|
||||||
|
relay.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue