Skip to content

Commit

Permalink
Removed the token lock from the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
manojmalik20 authored and mickmister committed Jun 8, 2022
1 parent 41df0ae commit f6ca061
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f6ca061

Please sign in to comment.