From a4e62fe90228aba9d55424c045fc193e41bc167f Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Fri, 19 Nov 2021 14:31:44 -0800 Subject: [PATCH] Lock app for CreateTaggedPeer --- app/app.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/app.go b/app/app.go index f90cf43..31c2159 100644 --- a/app/app.go +++ b/app/app.go @@ -93,6 +93,8 @@ func GenerateRandomID() string { } func (app *application) CreateTaggedPeer(name string, password string, tag string) { + app.appmutex.Lock() + defer app.appmutex.Unlock() profileDirectory := path.Join(app.directory, "profiles", GenerateRandomID())