Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jcox250 committed Apr 7, 2022
1 parent c9ce52b commit 368def5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type CfClient struct {
analyticsService *analyticsservice.AnalyticsService
clusterIdentifier string
stop chan struct{}
stopped safeBool
stopped *safeBool
}

// NewCfClient creates a new client instance that connects to CF with the default configuration.
Expand Down Expand Up @@ -464,17 +464,17 @@ type safeBool struct {
value bool
}

func newSafeBool(value bool) safeBool {
return safeBool{&sync.RWMutex{}, value}
func newSafeBool(value bool) *safeBool {
return &safeBool{&sync.RWMutex{}, value}
}

func (s safeBool) set(value bool) {
func (s *safeBool) set(value bool) {
s.RLock()
defer s.RUnlock()
s.value = value
}

func (s safeBool) bool() bool {
func (s *safeBool) bool() bool {
s.Lock()
defer s.Unlock()
return s.value
Expand Down

0 comments on commit 368def5

Please sign in to comment.