ndb: use is_closed which also check nil ptrs
not an issue atm, but maybe in the future
This commit is contained in:
@@ -35,7 +35,7 @@ class NdbTxn<T> {
|
||||
self.generation = Thread.current.threadDictionary["txn_generation"] as! Int
|
||||
} else {
|
||||
self.txn = ndb_txn()
|
||||
guard !ndb.closed else { return nil }
|
||||
guard !ndb.is_closed else { return nil }
|
||||
self.generation = ndb.generation
|
||||
let ok = ndb_begin_query(ndb.ndb.ndb, &self.txn) != 0
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user