mysql2 3.3.4 → 3.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/connection.js +3 -1
- package/package.json +1 -1
- package/typings/mysql/lib/Pool.d.ts +2 -2
package/lib/connection.js
CHANGED
|
@@ -54,7 +54,9 @@ class Connection extends EventEmitter {
|
|
|
54
54
|
|
|
55
55
|
// Optionally enable keep-alive on the socket.
|
|
56
56
|
if (this.config.enableKeepAlive) {
|
|
57
|
-
this.stream.
|
|
57
|
+
this.stream.on('connect', () => {
|
|
58
|
+
this.stream.setKeepAlive(true, this.config.keepAliveInitialDelay);
|
|
59
|
+
});
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
// Enable TCP_NODELAY flag. This is needed so that the network packets
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import {OkPacket, RowDataPacket, FieldPacket, ResultSetHeader} from './protocol/
|
|
|
4
4
|
import Connection = require('./Connection');
|
|
5
5
|
import PoolConnection = require('./PoolConnection');
|
|
6
6
|
import {EventEmitter} from 'events';
|
|
7
|
-
import {
|
|
7
|
+
import {Pool as PromisePool} from '../../../promise';
|
|
8
8
|
|
|
9
9
|
declare namespace Pool {
|
|
10
10
|
|
|
@@ -78,7 +78,7 @@ declare class Pool extends EventEmitter {
|
|
|
78
78
|
on(event: string, listener: Function): this;
|
|
79
79
|
on(event: 'connection', listener: (connection: PoolConnection) => any): this;
|
|
80
80
|
|
|
81
|
-
promise(promiseImpl?: PromiseConstructor):
|
|
81
|
+
promise(promiseImpl?: PromiseConstructor): PromisePool;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export = Pool;
|