From 6e63f0e2170cfd69992b7e691629e4565db0caa7 Mon Sep 17 00:00:00 2001 From: Patai Adam Date: Mon, 13 Feb 2017 05:20:41 +0100 Subject: [PATCH] Update readme (#1210) * Fix sample code in README * Fix typo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 308e9738..2901ee68 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,8 @@ pool.connect(function(err, client, done) { return console.error('error fetching client from pool', err); } client.query('SELECT $1::int AS number', ['1'], function(err, result) { - //call `done()` to release the client back to the pool - done(); + //call `done(err)` to release the client back to the pool (or destroy it if there is an error) + done(err); if(err) { return console.error('error running query', err);