浏览代码

Убрал ненужный this.taken

Book Pauk 5 年之前
父节点
当前提交
4b9475310f
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      server/db/SqliteConnectionPool.js

+ 0 - 3
server/db/SqliteConnectionPool.js

@@ -14,7 +14,6 @@ class SqliteConnectionPool {
         if (!Number.isInteger(connCount) || connCount <= 0)
         if (!Number.isInteger(connCount) || connCount <= 0)
             return;
             return;
         this.connections = [];
         this.connections = [];
-        this.taken = new Set();
         this.freed = new Set();
         this.freed = new Set();
 
 
         for (let i = 0; i < connCount; i++) {
         for (let i = 0; i < connCount; i++) {
@@ -22,7 +21,6 @@ class SqliteConnectionPool {
             client.configure('busyTimeout', 10000); //ms
             client.configure('busyTimeout', 10000); //ms
 
 
             client.ret = () => {
             client.ret = () => {
-                this.taken.delete(i);
                 this.freed.add(i);
                 this.freed.add(i);
             };
             };
 
 
@@ -52,7 +50,6 @@ class SqliteConnectionPool {
         }
         }
 
 
         this.freed.delete(freeConnIndex);
         this.freed.delete(freeConnIndex);
-        this.taken.add(freeConnIndex);
 
 
         return this.connections[freeConnIndex];
         return this.connections[freeConnIndex];
     }
     }