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 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.setKeepAlive(true, this.config.keepAliveInitialDelay);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysql2",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
4
4
  "description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -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 {PoolConnection as PromisePoolConnection} from '../../../promise';
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): PromisePoolConnection;
81
+ promise(promiseImpl?: PromiseConstructor): PromisePool;
82
82
  }
83
83
 
84
84
  export = Pool;