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

- use watchdog only in long-polling as SSE has auto-reconnection hand… #668

Merged
merged 3 commits into from Oct 28, 2017

Conversation

peuter
Copy link
Member

@peuter peuter commented Oct 27, 2017

…ling by the browser and the watchdog breaks the native mechanism

  • restart sse connection only when it is really closed
  • stop watchog if its already running on start (prevent multiple running intervals)

…ling by the browser and the watchdog breaks the native mechanism

- restart sse connection only when it is really closed
- stop watchog if its already running on start (prevent multiple running intervals)
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 60.897% when pulling 61ca415 on peuter:fix-sse into 4dec014 on CometVisu:develop.

@ChristianMayer
Copy link
Member

Give's an error with LongPolling:

LongPolling.js:149 Uncaught TypeError: Cannot read property 'ping' of undefined
    at wrapper.handleRead (LongPolling.js:149)
    at wrapper.dispatchEvent (Direct.js:135)
    at wrapper.wrappedFunction [as dispatchEvent] (Interface.js:537)
    at wrapper.dispatchEvent (Manager.js:887)
    at Object.__fireEvent (Registration.js:302)
    at Object.fireEvent (Registration.js:321)
    at wrapper.fireEvent (MEvent.js:181)
    at wrapper._fireStatefulEvent (AbstractRequest.js:826)
    at wrapper.__onReadyStateDone (AbstractRequest.js:748)
    at wrapper._onReadyStateChange (AbstractRequest.js:723)
    at construct.onreadystatechange (Function.js:232)
    at construct._emit (Xhr.js:515)
    at construct.__readyStateChange (Xhr.js:1008)
    at construct.__onNativeReadyStateChange (Xhr.js:984)
    at XMLHttpRequest.<anonymous> (Bootstrap.js:715)

@peuter
Copy link
Member Author

peuter commented Oct 28, 2017

I had a merge conflict after a branch changing, some changes obviously got lost dureing conflict solving. Please try again.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 60.767% when pulling a51e913 on peuter:fix-sse into 4dec014 on CometVisu:develop.

@ChristianMayer
Copy link
Member

There are no more error messages when using LongPolling - but the watchdog is broken.

With no traffic: after 60 seconds comes a new r - as it should
But that's stopping then. After 5 minutes the server is terminating and the client is immediately reconnecting (as it is supposed to do in this case) - but not the 60 second interval that should be coming from the client.
This results in the problem that when the internet connection is removed, I do get on the console a (expected)

GET http://wiregate/cgi-bin/r?t=0&s=SESSION&a=12/9/2&a=7/4/51&a=17/4/51 net::ERR_INTERNET_DISCONNECTED

but the client never recovers from that. I.e. when the connection comes back the r is never started again.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 60.691% when pulling a33943a on peuter:fix-sse into 4dec014 on CometVisu:develop.

@peuter peuter closed this Oct 28, 2017
@peuter peuter deleted the fix-sse branch October 28, 2017 12:46
@peuter peuter restored the fix-sse branch October 28, 2017 12:46
@peuter peuter reopened this Oct 28, 2017
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 60.736% when pulling a33943a on peuter:fix-sse into 4dec014 on CometVisu:develop.

@ChristianMayer ChristianMayer merged commit 9f22118 into CometVisu:develop Oct 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants