-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix SSE endpoint #2
Comments
I want help, but I can not understand how it works. |
You are right this SSE work more like regular polling then actual server push. The reason why data is the same because you do not have new request since last poll. Try to refresh page of demo app in separate tab and you will see new data in SSE request. |
I think the /sse endpoint simply closes the connection like a regular request, forcing the client to reopen it: https://github.com/aio-libs/aiohttp-debugtoolbar/blob/master/aiohttp_debugtoolbar/views.py#L156 Instead of switching to websockets, we can probably just fix this endpoint by using aiohttp-sse or something: https://github.com/aio-libs/aiohttp-sse#example This is probably a simple task and shouldn't require making any changes to the client code. |
Portend sse implementation works like simple polling so easily could be switched to ajax or websokets for message push. Javascript and backend implementation should be fixed.
The text was updated successfully, but these errors were encountered: