Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

FIX for application restart when srv not reachable #595

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

FIX for application restart when srv not reachable #595

wants to merge 2 commits into from

Conversation

v0lkan
Copy link

@v0lkan v0lkan commented Jul 10, 2015

Tested on Mac OS X Yosemite, Chrome Version 43.0.2357.132 (64-bit)

Steps to reproduce:

1. Run service by `dashing start`
2. View a dashboard
3. kill the service by CTRL + D
4. wait for five minutes.

expectation:
page should reload

what happens:
e.currentTarget.readyState is  0 (not initialized)
chrome's EventSource API tries to reconnect to a non-existent server over and over again.
The page never refreshes.

We clear errorTimerId immediately after we get a message event, so that there won't be redundant restarts.

On an edge case, the service might reconnect and won't get any messages for a while which might trigger the timer with errorTimerId; and that will cause only one extra refresh only.

v0lkan and others added 2 commits July 10, 2015 10:00
    Tested on Mac OS X Yosemite, Chrome Version 43.0.2357.132 (64-bit)

    Steps to reproduce:

    1. Run service by `dashing start`
    2. View a dashboard
    3. kill the service by CTRL + D
    4. wait for five minutes.

    expectation:
    page should reload

    what happens:
    e.currentTarget.readyState is  0 (not initialized)
    chrome's EventSource API tries to reconnect to a non-existent server over and over again.
    The page never refreshes.

    We clear errorTimerId immediately after we get a message event, so that there won't be redundant restarts.

    On an edge case, the service might reconnect and won't get any messages for a while which might trigger the timer with errorTimerId; and that will cause only one extra refresh only.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant