Commit 43838f7c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0d9a603c
...@@ -139,13 +139,13 @@ func NewDB(stor IStorage) *DB { ...@@ -139,13 +139,13 @@ func NewDB(stor IStorage) *DB {
return db return db
} }
// shutdown mark db no longer operational due to reason. // shutdown marks db no longer operational due to reason.
// //
// It serves both explicit Close, or shutdown triggered due to error received // It serves both explicit Close, or shutdown triggered due to error received
// by watcher. // by watcher. Only the first shutdown call has the effect.
func (db *DB) shutdown(reason error) { func (db *DB) shutdown(reason error) {
db.downOnce.Do(func() { db.downOnce.Do(func() {
db.downErr = reason // XXX err ctx ? db.downErr = reason
close(db.down) close(db.down)
db.stor.DelWatch(db.watchq) db.stor.DelWatch(db.watchq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment