Commit Graph
3 Commits
Author SHA1 Message Date
zeripathandGitHub 8e32eeb5de Hold the event source when there are no listeners (#15725)
* Hold the event source when there are no listeners

The event source does not need to run when there are no listeners. Therefore
pause it when there are none.

* add some more logging

Signed-off-by: Andrew Thornton <[email protected]>
2021-05-15 23:46:13 +02:00
ae56411e9f Move EventSource to SharedWorker (#12095)
Move EventSource to use a SharedWorker. This prevents issues with HTTP/1.1
open browser connections from preventing gitea from opening multiple tabs.

Also allow setting EVENT_SOURCE_UPDATE_TIME to disable EventSource updating

Fix #11978

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: silverwind <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2020-07-03 10:55:36 +01:00
zeripathandGitHub 791353c03b Add EventSource support (#11235)
If the browser supports EventSource switch to use this instead of
polling notifications.

Signed-off-by: Andrew Thornton [email protected]
2020-05-07 22:49:00 +01:00