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 <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
cd994f6354
commit
ae56411e9f
9 changed files with 220 additions and 36 deletions
|
@ -218,7 +218,7 @@ MIN_TIMEOUT = 10s
|
|||
MAX_TIMEOUT = 60s
|
||||
TIMEOUT_STEP = 10s
|
||||
; This setting determines how often the db is queried to get the latest notification counts.
|
||||
; If the browser client supports EventSource, it will be used in preference to polling notification.
|
||||
; If the browser client supports EventSource and SharedWorker, a SharedWorker will be used in preference to polling notification. Set to -1 to disable the EventSource
|
||||
EVENT_SOURCE_UPDATE_TIME = 10s
|
||||
|
||||
[markdown]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue