Add timeout to opening history db
This commit is contained in:
parent
e9cf38a866
commit
b81ba7b631
@ -48,7 +48,11 @@ func NewHistoryManager(dbPath string) (*HistoryManager, error) {
|
||||
historyEndPtr: make(map[*rooms.Room]uint64),
|
||||
historyLoadPtr: make(map[*rooms.Room]uint64),
|
||||
}
|
||||
db, err := bolt.Open(dbPath, 0600, nil)
|
||||
db, err := bolt.Open(dbPath, 0600, &bolt.Options{
|
||||
Timeout: 1,
|
||||
NoGrowSync: false,
|
||||
FreelistType: bolt.FreelistArrayType,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user