|
|
|
@ -10,7 +10,6 @@ package main
@@ -10,7 +10,6 @@ package main
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
"encoding/json" |
|
|
|
|
"fmt" |
|
|
|
|
"io/ioutil" |
|
|
|
|
"log" |
|
|
|
|
"math" |
|
|
|
@ -89,9 +88,9 @@ func (s *Stats) GetOverallMaxViewerCount() int {
@@ -89,9 +88,9 @@ func (s *Stats) GetOverallMaxViewerCount() int {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *Stats) SetClientActive(clientID string) { |
|
|
|
|
if _, ok := s.clients[clientID]; !ok { |
|
|
|
|
fmt.Println("Marking client active:", clientID, s.GetViewerCount()+1, "clients connected.") |
|
|
|
|
} |
|
|
|
|
// if _, ok := s.clients[clientID]; !ok {
|
|
|
|
|
// fmt.Println("Marking client active:", clientID, s.GetViewerCount()+1, "clients connected.")
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
s.clients[clientID] = time.Now() |
|
|
|
|
s.SessionMaxViewerCount = int(math.Max(float64(s.GetViewerCount()), float64(s.SessionMaxViewerCount))) |
|
|
|
|