types: Make ChannelNameMap use mutexes to fix crash

This commit is contained in:
Daniel Oaks 2017-04-17 21:01:39 +10:00
parent ff3a864aa3
commit e0035dfa04
3 changed files with 40 additions and 12 deletions

View file

@ -75,7 +75,7 @@ func restStatus(w http.ResponseWriter, r *http.Request) {
rs := restStatusResp{
Clients: restAPIServer.clients.Count(),
Opers: len(restAPIServer.operators),
Channels: len(restAPIServer.channels),
Channels: restAPIServer.channels.Len(),
}
b, err := json.Marshal(rs)
if err != nil {