cmd/syncthing, lib/events, lib/sync: Add timeout to REST event API, remove Ping (fixes #3933)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3941
This commit is contained in:
Antony Male
2017-01-31 12:04:29 +00:00
committed by Jakob Borg
parent 20f8b4fd57
commit ac510b26e2
11 changed files with 207 additions and 36 deletions

View File

@@ -6,10 +6,14 @@
package main
import "github.com/syncthing/syncthing/lib/events"
import (
"time"
"github.com/syncthing/syncthing/lib/events"
)
type mockedEventSub struct{}
func (s *mockedEventSub) Since(id int, into []events.Event) []events.Event {
func (s *mockedEventSub) Since(id int, into []events.Event, timeout time.Duration) []events.Event {
select {}
}