mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Debug too many open files
This commit is contained in:
parent
eb15434a8e
commit
70e9a7e8e5
@ -590,6 +590,9 @@ public final class SqliteValueBox: ValueBox {
|
|||||||
postboxLog("isEncrypted prepare done")
|
postboxLog("isEncrypted prepare done")
|
||||||
if statement == nil {
|
if statement == nil {
|
||||||
postboxLog("isEncrypted: sqlite3_prepare_v2 status = \(status) [\(self.databasePath)]")
|
postboxLog("isEncrypted: sqlite3_prepare_v2 status = \(status) [\(self.databasePath)]")
|
||||||
|
if status == 14 {
|
||||||
|
printOpenFiles()
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if status == SQLITE_NOTADB {
|
if status == SQLITE_NOTADB {
|
||||||
|
@ -34,7 +34,7 @@ public func printOpenFiles() {
|
|||||||
buf.withUnsafeMutableBytes { buffer -> Void in
|
buf.withUnsafeMutableBytes { buffer -> Void in
|
||||||
let _ = fcntl(fd, F_GETPATH, buffer.baseAddress!)
|
let _ = fcntl(fd, F_GETPATH, buffer.baseAddress!)
|
||||||
let string = String(cString: buffer.baseAddress!.assumingMemoryBound(to: CChar.self))
|
let string = String(cString: buffer.baseAddress!.assumingMemoryBound(to: CChar.self))
|
||||||
print(string)
|
postboxLog("f: \(string)")
|
||||||
}
|
}
|
||||||
|
|
||||||
fd += 1
|
fd += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user