moontreeapp / moontree

Primary Mono Repo
6 stars 5 forks source link

simplify reconnecting scheme #552

Closed lastmeta closed 2 years ago

lastmeta commented 2 years ago

Describe The Bug

we need to avoid the automatic reconnection because it's causing multiple connections being setup on the server, instead just connect as needed, when we discover we're disconnected by attempting to send something to the server.

To Reproduce

see server logs

Expected Behavior

not multiple connections

Log Output

No response

Additional Context

No response

Screenshots

No response

Tasks For This Bug

lastmeta commented 2 years ago

I've thought about this over the weekend and I think this might be the best way to do it: pass your client request to a function that passes it to a stream, anytime something comes on that stream it gets executed or if a connection doesn't exist it establishes one, basically turns the client single threaded. which should be fine. tbc

lastmeta commented 2 years ago

detect if system not connected or data / wifi turned off tell user to turn it on.

unrelated look at eip1139

lastmeta commented 2 years ago

/// refactor: now that we use the services to interact with the /// client exclusively we don't really need to put it in a stream...

lastmeta commented 2 years ago

reconnection looks good.