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
|
eventBuses map[string]event.Manager
|
||||||
directory string
|
directory string
|
||||||
|
|
||||||
peerLock sync.Mutex
|
peers map[string]peer.CwtchPeer
|
||||||
peers map[string]peer.CwtchPeer
|
acn connectivity.ACN
|
||||||
acn connectivity.ACN
|
plugins sync.Map //map[string] []plugins.Plugin
|
||||||
plugins sync.Map //map[string] []plugins.Plugin
|
|
||||||
|
|
||||||
engines map[string]connections.Engine
|
engines map[string]connections.Engine
|
||||||
appBus event.Manager
|
appBus event.Manager
|
||||||
|
@ -132,9 +131,6 @@ func (app *application) UpdateSettings(settings settings.GlobalSettings) {
|
||||||
defer app.appmutex.Unlock()
|
defer app.appmutex.Unlock()
|
||||||
app.settings.WriteGlobalSettings(settings)
|
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 {
|
for _, profile := range app.peers {
|
||||||
profile.UpdateExperiments(settings.ExperimentsEnabled, settings.Experiments)
|
profile.UpdateExperiments(settings.ExperimentsEnabled, settings.Experiments)
|
||||||
|
|
||||||
|
@ -154,8 +150,8 @@ func (app *application) UpdateSettings(settings settings.GlobalSettings) {
|
||||||
func (app *application) ListProfiles() []string {
|
func (app *application) ListProfiles() []string {
|
||||||
var keys []string
|
var keys []string
|
||||||
|
|
||||||
app.peerLock.Lock()
|
app.appmutex.Lock()
|
||||||
defer app.peerLock.Unlock()
|
defer app.appmutex.Unlock()
|
||||||
for handle := range app.peers {
|
for handle := range app.peers {
|
||||||
keys = append(keys, handle)
|
keys = append(keys, handle)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue