Socket
Socket
Sign inDemoInstall

postgres

Package Overview
Dependencies
0
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-beta.10 to 2.0.0-beta.11

12

lib/connection.js

@@ -355,4 +355,6 @@ const net = require('net')

let i = 0
let retries = 0
function onclose(err) {
retries++
oncleanup()

@@ -362,3 +364,3 @@ !ended && !succeeded && i < options.host.length

: err instanceof Error
? error(err)
? (error(err), close())
: close()

@@ -378,6 +380,10 @@ i >= options.host.length && (i = 0)

function connect() {
async function connect() {
if (!closed)
return
retries && await new Promise(r =>
setTimeout(r, Math.min((0.5 + Math.random()) * Math.pow(1.3, retries) * 10, 10000))
)
closed = succeeded = false

@@ -425,2 +431,3 @@

function ready() {
retries = 0
try {

@@ -436,2 +443,3 @@ socket.write(frontend.StartupMessage(options))

success: () => {
retries = 0
succeeded = true

@@ -438,0 +446,0 @@ i >= options.host.length && (i = 0)

2

package.json
{
"name": "postgres",
"version": "2.0.0-beta.10",
"version": "2.0.0-beta.11",
"description": "Fastest full featured PostgreSQL client for Node.js",

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc