Global Feed Post Login
Replying to Avatar Nice and Kind Vic

This is something I wish I knew about development with nostr ... These errors in the front end. I can only assume I'm either getting blocked from connecting from the remote servers all at once, or from my end, but don't have a clue how to resolve that

My pattern causing this is essentially ...

import {RelayPool} from 'nostr-relaypool';

const localpool = new RelayPool();

localpool.subscribe(...)

with localpool.close(); when done.

This is called periodically (currently 15 seconds). I've yet to figure out how to setup the logic to open the subscription, poll for new events, and stay open waiting for new ones and do reconnects and resubscribes if it gets disconnected.

Surely there has to be a way to talk to relays that doesn't connect/disconnect over and over.

Avatar
Raymon 1y ago

Works for me with nostr:nprofile1qqsr9cvzwc652r4m83d86ykplrnm9dg5gwdvzzn8ameanlvut35wy3gprpmhxue69uhhwetvvdhk6efwdehhxarj9emkjmn9qyxhwumn8ghj7mn0wvhxcmmvqyg8wumn8ghj7mn0wd68ytnhd9hx2yhtlun nostr-js lib an a heartbeat. But it's JavaScript...

Reply to this note

Please Login to reply.

Discussion

No replies yet.