Misc mutex locking things to avoid data races

This commit is contained in:
Dane Everitt
2020-07-18 16:03:25 -07:00
parent 0b9d923d15
commit 8315ff8ae1
8 changed files with 98 additions and 40 deletions

View File

@@ -127,10 +127,7 @@ func (h *Handler) TokenValid() error {
return errors.New("jwt does not have connect permission")
}
h.server.RLock()
defer h.server.RUnlock()
if h.server.Uuid != j.ServerUUID {
if h.server.Id() != j.GetServerUuid() {
return errors.New("jwt server uuid mismatch")
}