Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket reconnection #3

Open
wds4 opened this issue Jan 1, 2023 · 2 comments
Open

websocket reconnection #3

wds4 opened this issue Jan 1, 2023 · 2 comments

Comments

@wds4
Copy link
Contributor

wds4 commented Jan 1, 2023

Using nostr-react, I have managed to put a lot of basic functionality in place, including the main feed which loads very quickly, both in "following" mode and in "firehose" mode (completely unfiltered). One issue I have is that relay connections tend to get dropped after a short while, so I'm wondering: what would be the best method to reopen them? Should there be a module to check status periodically? Would it make more sense for this be part of nostr-react or something I'd build separately in my client?

@wds4
Copy link
Contributor Author

wds4 commented Jan 4, 2023

Seems like sometimes this is a problem, sometimes it's not. Every now and then I need to quit my desktop client and restart it to get a dropped nostr feed working again, but sometimes it seems to maintain for quite a while.

@wds4
Copy link
Contributor Author

wds4 commented Jan 4, 2023

I created a release (v0.1.0-alpha) for macOS, pulled up the app, left it on all night, and the next morning the connections remain intact. Main feed as well as individual profile data. And loading is very fast! 😃

But for the app running in dev mode, the console reports all of my nostr connections are closed, and the only way I can reconnect them is to restart the app. So I still haven't figured this problem out or whether it's something I need to worry about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant