-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
We need a way to detect that the connection to sbot is broken #29
Comments
I‘m relatively certain there is a reconnecting ssb-client already... at least I saw one once but might have been an old patchwork.. cc @mixmix other than that I would just do a setInterval thing on sbot.whoami as a kludge? |
@cryptix omg that setInterval hack, I am definitely using that I think. I know that losing the connection causes an exception in the console. I just don't know where is the best place to trap it. |
This magic
https://github.com/ssbc/patchcore/blob/d2f310a16a8a0b6fed80d8a4afa7cadb21610901/sbot.js#L60
…On Thu, 13 Jun 2019, 06:06 Andre Alves Garzia, ***@***.***> wrote:
@cryptix <https://github.com/cryptix> omg that setInterval hack, I am
definitely using that I think. I know that losing the connection causes an
exception in the console. I just don't know where is the best place to trap
it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29?email_source=notifications&email_token=AAUK3HXALFUUMQB265YCOFLP2E3JHA5CNFSM4HXGWFY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXRJZHQ#issuecomment-501390494>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAUK3HQKXP6VXTVSPAATIPLP2E3JHANCNFSM4HXGWFYQ>
.
|
@mixmix that does look like magic, I wish I understood pull-streams better. I am but a newbie regarding regarding them. That code is using depject and patchcore as well. I found it a bit hard to follow how it works, how So far it appears to be working but I need to test more. Thanks ❤️ again for sending that code to me though. Depending on how it goes, I'll try to reassemble it into something more self contained or minimal in the future. |
Of course all the mitigation code just failed in my face while I was working in this message... This is how the error page looks: At least clicking the There is code in the background to attempt reconnection if that exact error is detected but apparently it didn't trigger. |
you can ignore all the depject stuff around it. The point is that there's an "observeable" which contains the current connection (either a valid sbot connection, or null). This can be then passed around and you can "watch" that observeable and run things only when it's live
…On Jun 16 2019, at 12:00 am, Andre Alves Garzia ***@***.***> wrote:
Of course all the mitigation code just failed in my face while I was working in this message... This is how the error page looks:
At least clicking the try to reconnect option always work:
There is code in the background to attempt reconnection if that exact error is detected but apparently it didn't trigger.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub (#29?email_source=notifications&email_token=AAUK3HQ6OFULHGL53BBVNOTP2TKVXA5CNFSM4HXGWFY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYWUGA#issuecomment-502360600), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAUK3HWT3427RGAQO5JDHNTP2TKVXANCNFSM4HXGWFYQ).
|
Breaking the connection causes an exception now. This is trapped. I'm trying to find a better way to handle it. I need to investigate |
Currently there is no way to detect when the connection to sbot is lost. The page just stops. A simple refresh will reestablish it but this currently requires the user to notice and do it. This is a bug,.
The text was updated successfully, but these errors were encountered: