Info stream (#336)

* add /stream/info as a cheap way to subscribe to comment updates #253

* add check for lastTS change to allow proper info streams in no-cache mode

* check write error in info stream and terminate

* flaky info stream test

* add stream info to readme

* separate timeout middleware foe each route's group

* debug info on stream close

* fix test for streams

* stream timeout on inactivity only

* throttle streams to 500

* restore common throttle
This commit is contained in:
Umputun
2019-06-03 11:34:00 -05:00
committed by GitHub
parent bccf716a8d
commit ca083f451e
5 changed files with 209 additions and 6 deletions
+2
View File
@@ -304,6 +304,8 @@ func (s *ServerCommand) newServerApp() (*serverApp, error) {
SSLConfig: sslConfig,
UpdateLimiter: s.UpdateLimit,
ImageService: imageService,
StreamTimeOut: time.Minute * 15,
StreamRefresh: time.Second,
}
srv.ScoreThresholds.Low, srv.ScoreThresholds.Critical = s.LowScore, s.CriticalScore