Skip to content

Commit

Permalink
fix mutex usage...
Browse files Browse the repository at this point in the history
  • Loading branch information
nad2000 committed Aug 3, 2019
1 parent c86acd0 commit 89ddbe6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ go test -v .
go test -v . -args -verbose
# with 'live server' instead of using the mock:
go test -v . -args -live
# to get coverage report (user "-tags test" to exclude Lambda specific bits from the coverage):
gotest ./... -tags test -cover -coverprofile coverage.out ; go tool cover -html=coverage.out -o coverage.html


```

Expand Down
4 changes: 3 additions & 1 deletion handler/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ func setupAPIClients() {
if err != nil || oh.accessToken == "" {
log.Fatal("filed to authorize with the client credentials", zap.Error(err))
}
accessTokenIsOnTheWay.Unlock()
gotAccessTokenWG.Done()
}()
} else {
accessTokenIsOnTheWay.Unlock()
}
accessTokenIsOnTheWay.Unlock()
}

func (c *Client) getAccessToken(url string) error {
Expand Down

0 comments on commit 89ddbe6

Please sign in to comment.