Skip to content

Commit 07d5b7c

Browse files
authored
Coerce various pooling configs into integers (#32)
- minPoolSize - maxPoolSize - connectionTimeout code review changes
1 parent b2aa7c4 commit 07d5b7c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/ibmdb.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ function IBMDB(name, settings) {
5252

5353
// Save off the connectionOptions passed in for connection pooling
5454
this.connectionOptions = {};
55-
this.connectionOptions.minPoolSize = (settings.minPoolSize || 0);
56-
this.connectionOptions.maxPoolSize = (settings.maxPoolSize || 0);
57-
this.connectionOptions.connectionTimeout = (settings.connectionTimeout || 60);
55+
this.connectionOptions.minPoolSize = parseInt(settings.minPoolSize, 10) || 0;
56+
this.connectionOptions.maxPoolSize = parseInt(settings.maxPoolSize, 10) || 0;
57+
this.connectionOptions.connectionTimeout =
58+
parseInt(settings.connectionTimeout, 10) || 60;
5859

5960
// Create the Connection Pool object. It will be initialized once we
6061
// have the connection string prepped below.

0 commit comments

Comments
 (0)