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
CometD: stalled subscription notifications #530
Comments
Is this something @CDrummond has seen, too? Are you able to reproduce this with any browser? |
Can't say I have noticed this issue, and I do refresh the page quite often to ensure the skin reloads. I clear cache and do a full refresh/reload, so perhaps this is why I do not see it? I have noticed, but probably not related to this issue, that notifications can be 'slow' (i.e. take a few seconds to show), which is why Material manually requests a status update after most actions. |
Reproduced with Chrome + Firefox on Windows and Chrome on Android. I'm pretty sure it's not a client issue - the page refreshing just seems to be a reasonably reliable way to get the What I think is happening is that the So, the |
Thanks for your test files, @timbell. I believe I have been able to reproduce the issue: sometimes after reloading a web UI using long-polling, it would take a time out on the long-poll before the connection would re-establish. Therefore after a page reload we can have up to 60 seconds before the notifications are reaching the web UI. Is this correct? Are there any other limitations I haven't been able to experience? |
Yes, @michaelherger, that's right. (There may be other ways that can cause the A simple fix might be to clear the transport in
|
Testing CometD subcriptions to server status and player status notifications using libcometd.js from the material-skin plugin.
When this code path is followed on the server long-polled notifications are stalled until the next long polling timeout (60s) occurs. This is due to the remove_connection call in
sendHTTPResponse
.Reproducing the problem is a bit tricky. I've managed to do it reasonably reliably using the attached test web page as follows:
test-cometd
folder underHTML/Default/html
folder on the serverhttp://localhost:9000/html/test-cometd/
Connect
(the first player registered on the server will be selected) and thenSubscribe Player
Log
widgetNB the page refreshing is crucial to getting
transport('long-polling')
to be set on the$httpClient
used to service the/slim/subscribe
player status call.From what I can see, the problem could be fixed in a few different ways:
remove_connection
call in this exact caseremove_connection
call more generally - eg only calling it in the/meta/(re)connect
case?$httpClient->transport('long-polling')
from the client once the response has been sentThe problem was reproduced with LMS running on Windows 10 (version 8.1) and Linux (version 7.9.1).
The text was updated successfully, but these errors were encountered: