diff --git a/src/app/spreed-speakfreely-server/connection.go b/src/app/spreed-speakfreely-server/connection.go index 96d7360c..cf543101 100644 --- a/src/app/spreed-speakfreely-server/connection.go +++ b/src/app/spreed-speakfreely-server/connection.go @@ -143,7 +143,6 @@ func (c *Connection) readPump() { c.ws.SetReadLimit(maxMessageSize) c.ws.SetReadDeadline(time.Now().Add(pongWait)) c.ws.SetPongHandler(func(string) error { - log.Println("Received pong", c.Idx) c.ws.SetReadDeadline(time.Now().Add(pongWait)) return nil }) @@ -270,10 +269,6 @@ func (c *Connection) writePump() { // Write ping message. func (c *Connection) ping() error { - log.Println("Sending ping", c.Idx) - defer func() { - log.Println("Sent ping", c.Idx) - }() return c.write(websocket.PingMessage, []byte{}) } diff --git a/src/app/spreed-speakfreely-server/hub.go b/src/app/spreed-speakfreely-server/hub.go index 76239bbc..4005993c 100644 --- a/src/app/spreed-speakfreely-server/hub.go +++ b/src/app/spreed-speakfreely-server/hub.go @@ -46,13 +46,13 @@ type MessageRequest struct { } type HubStat struct { - Rooms int `json:"rooms"` - Connections int `json:"connections"` - Users int `json:"users"` - Count uint64 `json:"count"` - IdsInRoom map[string][]string `json:"idsinroom,omitempty"` - UsersById map[string]*DataUser `json:"usersbyid,omitempty"` - ConnectionsByIdx map[string]string `json:"connectionsbyidx,omitempty"` + Rooms int `json:"rooms"` + Connections int `json:"connections"` + Users int `json:"users"` + Count uint64 `json:"count"` + IdsInRoom map[string][]string `json:"idsinroom,omitempty"` + UsersById map[string]*DataUser `json:"usersbyid,omitempty"` + ConnectionsByIdx map[string]string `json:"connectionsbyidx,omitempty"` } type Hub struct { @@ -112,7 +112,7 @@ func (h *Hub) Stat(details bool) *HubStat { stat.UsersById = users connections := make(map[string]string) for id, connection := range h.connectionTable { - connections[fmt.Sprintf("%d", connection.Idx)]=id + connections[fmt.Sprintf("%d", connection.Idx)] = id } stat.ConnectionsByIdx = connections }