Socket
Socket
Sign inDemoInstall

pg-pool

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-pool - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

19

index.js

@@ -19,3 +19,3 @@ 'use strict'

client.release = throwOnRelease
if (err) {
if (err || this.ending) {
this._remove(client)

@@ -32,10 +32,6 @@ this._pulseQueue()

this._remove(client)
}, this.idleTimeoutMillis)
}, this.options.idleTimeoutMillis)
}
if (this.ending) {
this._remove(client)
} else {
this._idle.push(new IdleItem(client, tid))
}
this._idle.push(new IdleItem(client, tid))
this._pulseQueue()

@@ -69,2 +65,6 @@ }

if (typeof this.options.idleTimeoutMillis === 'undefined') {
this.options.idleTimeoutMillis = 10000
}
this._clients = []

@@ -120,3 +120,6 @@ this._idle = []

_remove (client) {
this._idle = this._idle.filter(item => item.client !== client)
this._idle = this._idle.filter(item => {
clearTimeout(item.timeoutId)
return item.client !== client
})
this._clients = this._clients.filter(c => c !== client)

@@ -123,0 +126,0 @@ client.end()

{
"name": "pg-pool",
"version": "2.0.0",
"version": "2.0.1",
"description": "Connection pool for node-postgres",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -20,10 +20,10 @@ # pg-pool

//by default the pool uses the same
//configuration as whatever `pg` version you have installed
// by default the pool uses the same
// configuration as whatever `pg` version you have installed
var pool = new Pool()
//you can pass properties to the pool
//these properties are passed unchanged to both the node-postgres Client constructor
//and the node-pool (https://github.com/coopernurse/node-pool) constructor
//allowing you to fully configure the behavior of both
// you can pass properties to the pool
// these properties are passed unchanged to both the node-postgres Client constructor
// and the node-pool (https://github.com/coopernurse/node-pool) constructor
// allowing you to fully configure the behavior of both
var pool2 = new Pool({

@@ -35,5 +35,6 @@ database: 'postgres',

ssl: true,
max: 20, //set pool max size to 20
min: 4, //set min pool size to 4
idleTimeoutMillis: 1000 //close idle clients after 1 second
max: 20, // set pool max size to 20
min: 4, // set min pool size to 4
idleTimeoutMillis: 1000, // close idle clients after 1 second
connectionTimeoutMillis: 1000, // return an error after 1 second if connection could not be established
})

@@ -40,0 +41,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc