mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +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
@ -327,7 +327,9 @@ func (s *apiService) Serve() {
|
|||||||
|
|
||||||
srv := http.Server{
|
srv := http.Server{
|
||||||
Handler: handler,
|
Handler: handler,
|
||||||
ReadTimeout: 10 * time.Second,
|
// 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)
|
s.fss = newFolderSummaryService(s.cfg, s.model)
|
||||||
|
Loading…
Reference in New Issue
Block a user