forked from cwtch.im/cwtch
remove peerlock probably left over from peerapp seperation
This commit is contained in:
parent
e9e2a18678
commit
7053f4a31b
14
app/app.go
14
app/app.go
|
@ -24,10 +24,9 @@ type application struct {
|
|||
eventBuses map[string]event.Manager
|
||||
directory string
|
||||
|
||||
peerLock sync.Mutex
|
||||
peers map[string]peer.CwtchPeer
|
||||
acn connectivity.ACN
|
||||
plugins sync.Map //map[string] []plugins.Plugin
|
||||
peers map[string]peer.CwtchPeer
|
||||
acn connectivity.ACN
|
||||
plugins sync.Map //map[string] []plugins.Plugin
|
||||
|
||||
engines map[string]connections.Engine
|
||||
appBus event.Manager
|
||||
|
@ -132,9 +131,6 @@ func (app *application) UpdateSettings(settings settings.GlobalSettings) {
|
|||
defer app.appmutex.Unlock()
|
||||
app.settings.WriteGlobalSettings(settings)
|
||||
|
||||
// we now need to propagate changes to all peers
|
||||
app.peerLock.Lock()
|
||||
defer app.peerLock.Unlock()
|
||||
for _, profile := range app.peers {
|
||||
profile.UpdateExperiments(settings.ExperimentsEnabled, settings.Experiments)
|
||||
|
||||
|
@ -154,8 +150,8 @@ func (app *application) UpdateSettings(settings settings.GlobalSettings) {
|
|||
func (app *application) ListProfiles() []string {
|
||||
var keys []string
|
||||
|
||||
app.peerLock.Lock()
|
||||
defer app.peerLock.Unlock()
|
||||
app.appmutex.Lock()
|
||||
defer app.appmutex.Unlock()
|
||||
for handle := range app.peers {
|
||||
keys = append(keys, handle)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue