Browse Source

keepalive

axcwg 5 tháng trước cách đây
mục cha
commit
cba75d1d40
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      main.js

+ 2 - 2
main.js

@@ -6,10 +6,10 @@ const app = express();
 const mysql = require('mysql2')
 const SendSeekable = require('send-seekable');
 const pool = mysql.createPool({
-    keepAliveInitialDelay: 300, enableKeepAlive: true,
+    keepAliveInitialDelay: 0, enableKeepAlive: true,
 })
 const db = mysql.createConnection({
-    host: 'mc.andyxie.cn', user: 'instrunet', password: 'Moyingren2015', database: "instrunet_data", pool: pool,
+    host: 'mc.andyxie.cn', user: 'instrunet', password: 'Moyingren2015', database: "instrunet_data", pool: pool,enableKeepAlive: true, keepAliveInitialDelay: 0,
 })
 const nodemailer = require('nodemailer')