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

Message: Can’t establish a connection to the server at ... #960

Closed
1manfactory opened this issue Dec 22, 2017 · 16 comments
Closed

Message: Can’t establish a connection to the server at ... #960

1manfactory opened this issue Dec 22, 2017 · 16 comments

Comments

@1manfactory
Copy link

I always leave a tab open in the background.

Since the last theme update I get this message pop up

Can’t establish a connection to the server at

This NEVER happened before.

@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

In case connection breaks, it pops up. When connection is back, you should see green notice and on the tab focus it will disappear.

I never get this error on the other side (I have stable connection though)

@fdmgit
Copy link
Contributor

fdmgit commented Dec 22, 2017

I have from time to time the same effect as 1manfactory.
I get the red notice that the connection is lost and after a while the green notice that the connection is established.

I have definitely a stable (100 mb/s) WAN connection to the server.

@gnadelwartz
Copy link
Contributor

gnadelwartz commented Dec 22, 2017

i had this today also on my local nas, from my guess it happens when my nas was syncing big files in background and responds not fast enough.

on my server in the cloud i didn't noticed it so far.

may be the message should only displayed if 1-3 reconnects fail
making message display, timeout and retrys configurable would be nice

@gnadelwartz
Copy link
Contributor

BTW: is this message triggered by realtime stats?

@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

This message would be triggered by any connection error. Any error would case it.

What do you propose, come on, share your thoughts.

@gnadelwartz
Copy link
Contributor

IHMO it should only displayed if multiple errors accour,eg. because internet connection is lost.

@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

Hm.. Then I need to differentiate human calls and programmatic.

@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

Maybe make it optional?

@gnadelwartz
Copy link
Contributor

this was why i asked about realtime stats, these should not trigger the message, optional would be a simple solution. or a checkbox/button in the message box "do not display again (in current session)" ...

@gnadelwartz
Copy link
Contributor

gnadelwartz commented Dec 22, 2017

btw. does background collection of relatime stats also happen when tab/window is hidden?

I use window.requestAnimationFrame() to stop execution of periodic events when tab/window is hidden. requestAnimationFrame()calls are paused in most browsers when running in background tabs or hidden <iframe>s in order to improve performance and battery life.
https://developer.mozilla.org/de/docs/Web/API/window/requestAnimationFrame

e.g. if you use setTimeout(something, 1000); to trigger a a periodic function, replacing it with window.requestAnimationFrame(function(){setTimeout(something, 1000);}); will pause when tab/window is hidden.

@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

I really should consider stop collecting data on window blur. I should've thought about it right away, strange that I didn't.

Thank you.

@iliajie
Copy link
Collaborator

iliajie commented Dec 22, 2017

Damn it, this absolute must have.

What change I've made!?

  1. Live stats will only run when the tab is focused;
  2. Connection error will only happen on human's interraction.

Perfect! Thanks for your advices! 😀

@iliajie iliajie closed this as completed Dec 22, 2017
@1manfactory
Copy link
Author

Hello.
Sorry, I can't follow your dialog.
Is this a bug or not?
Will ist be fixed or not?
Thanks

@iliajie
Copy link
Collaborator

iliajie commented Dec 24, 2017

It's been fixed. Please update to the latest version of the theme.

It will not pop up automatically. It will only be shown in case human interaction happens (you make a click) and network is not available. In all other cases it won't be shown.

@1manfactory
Copy link
Author

Ok. Just manually uploaded to the newest version.
Thank you SO SO SO much for your afford and hart work - even on christmas.

@iliajie
Copy link
Collaborator

iliajie commented Dec 24, 2017

:) You are welcome. I love doing it.

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

4 participants