mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 04:40:37 +03:00
Reduce logging
This commit is contained in:
parent
baddda3461
commit
3317a4a5c6
1 changed files with 3 additions and 2 deletions
5
stats.go
5
stats.go
|
@ -78,13 +78,14 @@ func (s *Stats) GetOverallMaxViewerCount() int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Stats) SetClientActive(clientID string) {
|
func (s *Stats) SetClientActive(clientID string) {
|
||||||
fmt.Println("Marking client active:", clientID)
|
if _, ok := s.clients[clientID]; !ok {
|
||||||
|
fmt.Println("Marking client active:", clientID, s.GetViewerCount()+1, "clients connected.")
|
||||||
|
}
|
||||||
|
|
||||||
s.clients[clientID] = time.Now()
|
s.clients[clientID] = time.Now()
|
||||||
s.SessionMaxViewerCount = int(math.Max(float64(s.GetViewerCount()), float64(s.SessionMaxViewerCount)))
|
s.SessionMaxViewerCount = int(math.Max(float64(s.GetViewerCount()), float64(s.SessionMaxViewerCount)))
|
||||||
s.OverallMaxViewerCount = int(math.Max(float64(s.SessionMaxViewerCount), float64(s.OverallMaxViewerCount)))
|
s.OverallMaxViewerCount = int(math.Max(float64(s.SessionMaxViewerCount), float64(s.OverallMaxViewerCount)))
|
||||||
|
|
||||||
fmt.Println("Now", s.GetViewerCount(), "clients connected.")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Stats) ViewerDisconnected(clientID string) {
|
func (s *Stats) ViewerDisconnected(clientID string) {
|
||||||
|
|
Loading…
Reference in a new issue