Skip to content

Commit

Permalink
Fix doReload race
Browse files Browse the repository at this point in the history
  • Loading branch information
buger committed Dec 7, 2017
1 parent 27e8a36 commit cb80476
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,12 @@ func rpcReloadLoop(rpcKey string) {
}
}

var reloadMu sync.Mutex

func doReload() {
reloadMu.Lock()
defer reloadMu.Unlock()

// Load the API Policies
syncPolicies()
// load the specs
Expand Down

0 comments on commit cb80476

Please sign in to comment.