Skip to content

Commit

Permalink
correct statistics endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
canergulay committed Jun 20, 2024
1 parent 3efc437 commit a1e9650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/handle_stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import (
)

func (ws wsServer) HandleStatistics (w http.ResponseWriter, r *http.Request) {
w.Write([]byte(fmt.Sprintf("Number of active users: %d \n", len(ws.userHub.Users))))
w.Write([]byte(fmt.Sprintf("Number of active connections: %d \n", len(ws.connectionHub.Connections))))
w.Write([]byte(fmt.Sprintf("active users: %d \n", len(ws.userHub.Users))))
w.Write([]byte(fmt.Sprintf("active connections: %d \n", len(ws.connectionHub.Connections))))
}

0 comments on commit a1e9650

Please # to comment.