mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 02:48:59 +00:00
cmd/syncthing: Avoid Keepalive/GUI refresh race
This avoids unnecessary browser request failures and retries. Eg: - Browser reuses existing HTTP connection for GUI refresh request - Server closes connection with request in flight - Browser retries GET request. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3854
This commit is contained in:
parent
8e8b867fba
commit
69ae4aa024
@ -326,8 +326,10 @@ func (s *apiService) Serve() {
|
||||
handler = debugMiddleware(handler)
|
||||
|
||||
srv := http.Server{
|
||||
Handler: handler,
|
||||
ReadTimeout: 10 * time.Second,
|
||||
Handler: handler,
|
||||
// ReadTimeout must be longer than SyncthingController $scope.refresh
|
||||
// interval to avoid HTTP keepalive/GUI refresh race.
|
||||
ReadTimeout: 15 * time.Second,
|
||||
}
|
||||
|
||||
s.fss = newFolderSummaryService(s.cfg, s.model)
|
||||
|
Loading…
Reference in New Issue
Block a user