Skip to content

Commit

Permalink
code review refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzyfresh committed Sep 24, 2019
1 parent d771003 commit e502d0e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client/state/state_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,9 @@ func NewBoltStateDB(logger hclog.Logger, stateDir string) (StateDB, error) {

// Create or open the boltdb state database
db, err := boltdd.Open(fn, 0600, timeout)
if err != nil {
if err == bolt.ErrTimeout {
return nil, fmt.Errorf("timed out while opening database, is another Nomad process accessing data_dir %s?", stateDir)
}
if err == bolt.ErrTimeout {
return nil, fmt.Errorf("timed out while opening database, is another Nomad process accessing data_dir %s?", stateDir)
} else if err != nil {
return nil, fmt.Errorf("failed to create state database: %v", err)
}

Expand Down

0 comments on commit e502d0e

Please sign in to comment.