Address some race conditions

This commit is contained in:
Dane Everitt
2020-07-19 17:46:39 -07:00
parent 21e58b57a1
commit e28c05ae56
5 changed files with 28 additions and 5 deletions

View File

@@ -77,6 +77,13 @@ func (s *Server) Config() *Configuration {
return &s.cfg
}
func (c *Configuration) GetUuid() string {
c.mu.RLock()
defer c.mu.RUnlock()
return c.Uuid
}
func (c *Configuration) SetSuspended(s bool) {
c.mu.Lock()
c.Suspended = s