diff --git a/src/relay/conn.go b/src/relay/conn.go index 3ab014f..d87a933 100644 --- a/src/relay/conn.go +++ b/src/relay/conn.go @@ -10,7 +10,7 @@ import ( const ( // Time allowed to write a message to the peer. - writeWait = 10 * time.Second + writeWait = 6000 * time.Second // Time allowed to read the next pong message from the peer. pongWait = 6000 * time.Second diff --git a/src/relay/hub.go b/src/relay/hub.go index c846b50..8129d7f 100644 --- a/src/relay/hub.go +++ b/src/relay/hub.go @@ -62,6 +62,7 @@ func (h *hub) run() { for connection := range h.rooms.rooms[s.room] { close(connection.send) } + log.Debugf("deleting room %s", s.room) delete(h.rooms.rooms, s.room) } h.rooms.Unlock() @@ -71,6 +72,7 @@ func (h *hub) run() { for connection := range h.rooms.rooms[s.room] { close(connection.send) } + log.Debugf("deleting room %s", s.room) delete(h.rooms.rooms, s.room) h.rooms.Unlock() case m := <-h.broadcast: @@ -86,6 +88,7 @@ func (h *hub) run() { close(c.send) delete(connections, c) if len(connections) == 0 { + log.Debugf("deleting room %s", m.room) delete(h.rooms.rooms, m.room) } }