Skip to content

Commit

Permalink
Merge branch '4' into 5
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Mar 9, 2019
2 parents 43401b4 + 1abfe91 commit a516f98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v5.0.1 (2019-03-09)
-------------------
[change] Config objects are cloned so that the original object is not modified

v5.0.0 (2019-03-07)
-------------------
[new] Added pause / resume feature to streamed requests ([#775](https://github.com/tediousjs/node-mssql/pull/775))
Expand All @@ -7,6 +11,10 @@ v5.0.0 (2019-03-07)
[removed] Node.js < 6 is no longer supported
[removed] Support dropped for deprecated tedious configuration values and types

v4.3.4 (2019-03-09)
-------------------
[change] Config objects are cloned so that the original object is not modified

v4.3.3 (2019-03-07)
-------------------
[change] Updated to latest generic-pool 3.6.1
Expand Down
7 changes: 4 additions & 3 deletions lib/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,20 @@ class ConnectionPool extends EventEmitter {
IDS.add(this, 'ConnectionPool')
debug('pool(%d): created', IDS.get(this))

this.config = config
this._connected = false
this._connecting = false

if (typeof this.config === 'string') {
if (typeof config === 'string') {
try {
this.config = ConnectionString.resolve(this.config, driver.name)
this.config = ConnectionString.resolve(config, driver.name)
} catch (ex) {
if (typeof callback === 'function') {
return callback(ex)
}
throw ex
}
} else {
this.config = Object.assign({}, config)
}

// set defaults
Expand Down

0 comments on commit a516f98

Please sign in to comment.