From ddca8d91fa137ea39e40274167398a68eb4c3bc4 Mon Sep 17 00:00:00 2001 From: Antony Male Date: Tue, 24 Jan 2017 17:32:34 +0000 Subject: [PATCH] cmd/syncthing: Send Ping events to the disk events API The Ping event is important, as it means that requests complete within a sensible time. The disk events API didn't have the Ping event, so if there were no disk events, the request would keep taking forever. Unless, of course, there's a reverse proxy which times the request out after a suitably large interval (or something else aborts it), in which case Syncthing isn't very happy. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3929 --- cmd/syncthing/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index 2d09fe5b3..44b31a2cb 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -584,7 +584,7 @@ func syncthingMain(runtimeOptions RuntimeOptions) { // events. The LocalChangeDetected event might overwhelm the event // receiver in some situations so we will not subscribe to it here. apiSub := events.NewBufferedSubscription(events.Default.Subscribe(events.AllEvents&^events.LocalChangeDetected&^events.RemoteChangeDetected), 1000) - diskSub := events.NewBufferedSubscription(events.Default.Subscribe(events.LocalChangeDetected|events.RemoteChangeDetected), 1000) + diskSub := events.NewBufferedSubscription(events.Default.Subscribe(events.LocalChangeDetected|events.RemoteChangeDetected|events.Ping), 1000) if len(os.Getenv("GOMAXPROCS")) == 0 { runtime.GOMAXPROCS(runtime.NumCPU())