From f6ca06126c5883539fab5ac7101b3c48552f22ee Mon Sep 17 00:00:00 2001 From: Manoj Date: Wed, 1 Jun 2022 14:27:13 +0530 Subject: [PATCH] Removed the token lock from the plugin --- server/plugin.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/plugin.go b/server/plugin.go index 81649dec..3fc27614 100644 --- a/server/plugin.go +++ b/server/plugin.go @@ -48,7 +48,6 @@ type Plugin struct { // configurationLock synchronizes access to the configuration. configurationLock sync.RWMutex - tokenLock sync.Mutex // configuration is the active plugin configuration. Consult getConfiguration and // setConfiguration for usage. @@ -198,8 +197,6 @@ func (p *Plugin) getGitlabUserInfoByMattermostID(userID string) (*gitlab.UserInf var userInfo gitlab.UserInfo - p.tokenLock.Lock() - defer p.tokenLock.Unlock() if infoBytes, err := p.API.KVGet(userID + GitlabTokenKey); err != nil || infoBytes == nil { return nil, &APIErrorResponse{ID: APIErrorIDNotConnected, Message: "Must connect user account to GitLab first.", StatusCode: http.StatusBadRequest} } else if err := json.Unmarshal(infoBytes, &userInfo); err != nil {