mirror of
https://github.com/moby/moby.git
synced 2026-08-10 17:15:06 +00:00
Honoring ConnectionTimeout in boltdb
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
@@ -55,7 +55,12 @@ func New(endpoints []string, options *store.Config) (store.Store, error) {
|
||||
if err := os.MkdirAll(dir, 0750); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
db, err := bolt.Open(endpoints[0], 0644, nil)
|
||||
|
||||
var boltOptions *bolt.Options
|
||||
if options != nil {
|
||||
boltOptions = &bolt.Options{Timeout: options.ConnectionTimeout}
|
||||
}
|
||||
db, err := bolt.Open(endpoints[0], 0644, boltOptions)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user