This commit is contained in:
boufni95 2023-12-14 20:07:49 +01:00
parent 6598476b2f
commit 8b4e14e21c

View file

@ -98,13 +98,14 @@ export default class Handler {
const log = getLogger({})
log("conneting to relay...", this.settings.relays[0])
const relay = relayInit(this.settings.relays[0]) // TODO: create multiple conns for multiple relays
relay.on('connect', () => { console.log("connected") })
await relay.connect()
log("connected, subbing...")
relay.on('disconnect', () => {
log("relay disconnected, will try to reconnect")
relay.close()
this.Connect()
})
const sub = relay.sub([
const sub = s.sub([
{
since: Math.ceil(Date.now() / 1000),
kinds: [21000],