Skip to content

Commit

Permalink
internal/globalconfig: fix wrong mutex acquired for SetServiceName (D…
Browse files Browse the repository at this point in the history
  • Loading branch information
vikpattabi authored and mingrammer committed Dec 22, 2020
1 parent b82047b commit 1b10bce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/globalconfig/globalconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func ServiceName() string {

// SetServiceName sets the global service name set for this application.
func SetServiceName(name string) {
cfg.mu.RLock()
defer cfg.mu.RUnlock()
cfg.mu.Lock()
defer cfg.mu.Unlock()
cfg.serviceName = name
}

0 comments on commit 1b10bce

Please sign in to comment.