diff --git a/app/app.go b/app/app.go index ecef3ef..36950d9 100644 --- a/app/app.go +++ b/app/app.go @@ -160,6 +160,8 @@ func (app *application) ListProfiles() []string { // GetPeer returns a cwtchPeer for a given onion address func (app *application) GetPeer(onion string) peer.CwtchPeer { + app.appmutex.Lock() + defer app.appmutex.Unlock() if profile, ok := app.peers[onion]; ok { return profile }