Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 1.0.1 to 1.0.2

9

index.js

@@ -63,9 +63,10 @@ var genericPool = require('generic-pool')

client.release = function (err) {
delete client.release
if (err) {
this.log('release client. error:', err)
this.log('destroy client. error:', err)
this.pool.destroy(client)
} else {
this.log('release client')
this.pool.release(client)
}
this.log('release client')
delete client.release
this.pool.release(client)
}.bind(this)

@@ -72,0 +73,0 @@

{
"name": "pg-pool",
"version": "1.0.1",
"version": "1.0.2",
"description": "Connection pool for node-postgres",

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

@@ -92,3 +92,14 @@ var expect = require('expect.js')

it('recovers from all errors', co.wrap(function * () {
var pool = new Pool({ poolSize: 9 })
var pool = new Pool({
poolSize: 9,
log: function (str, level) {
// Custom logging function to ensure we are not causing errors or warnings
// inside the `generic-pool` library.
if (level === 'error' || level === 'warn') {
expect().fail('An error or warning was logged from the generic pool library.\n' +
'Level: ' + level + '\n' +
'Message: ' + str + '\n')
}
}
})
var count = 0

@@ -95,0 +106,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