Skip to content

Commit

Permalink
internal/globalconfig: fix wrong mutex acquired for SetServiceName (#659
Browse files Browse the repository at this point in the history
)

Fixes #658
  • Loading branch information
vikpattabi authored May 11, 2020
1 parent 435545b commit 28e8330
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 28e8330

Please sign in to comment.