diff --git a/lib/connection_config.js b/lib/connection_config.js index b65f3fec10..64f7f81a29 100644 --- a/lib/connection_config.js +++ b/lib/connection_config.js @@ -18,10 +18,12 @@ const validOptions = { dateStrings: 1, debug: 1, decimalNumbers: 1, + enableKeepAlive: 1, flags: 1, host: 1, insecureAuth: 1, isServer: 1, + keepAliveInitialDelay: 1, localAddress: 1, maxPreparedStatements: 1, multipleStatements: 1, @@ -93,6 +95,8 @@ class ConnectionConfig { this.debug = options.debug; this.trace = options.trace !== false; this.stringifyObjects = options.stringifyObjects || false; + this.enableKeepAlive = !!options.enableKeepAlive; + this.keepAliveInitialDelay = options.keepAliveInitialDelay || 0; if ( options.timezone && !/^(?:local|Z|[ +-]\d\d:\d\d)$/.test(options.timezone)