fix
This commit is contained in:
parent
bb91db0e6a
commit
937a2b61ae
@ -18,11 +18,14 @@ func loadClients() {
|
|||||||
b, err := ioutil.ReadFile("./clients.json")
|
b, err := ioutil.ReadFile("./clients.json")
|
||||||
logOnError(err, "loadClients : ReadFile(./clients.json)")
|
logOnError(err, "loadClients : ReadFile(./clients.json)")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = json.Unmarshal(b, &clts)
|
err = json.Unmarshal(b, &clts)
|
||||||
logOnError(err, "loadClients : Unmarshal(./clients.json)")
|
logOnError(err, "loadClients : Unmarshal(./clients.json)")
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
muxClients.Lock()
|
muxClients.Lock()
|
||||||
for _, c := range clts {
|
for _, c := range clts {
|
||||||
@ -34,6 +37,8 @@ func loadClients() {
|
|||||||
}
|
}
|
||||||
muxClients.Unlock()
|
muxClients.Unlock()
|
||||||
|
|
||||||
|
return
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func getLockedRoleClient(role string) (*ChirpClient, error) {
|
func getLockedRoleClient(role string) (*ChirpClient, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user