summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/index.js b/index.js
index ecb2a00..3e69036 100644
--- a/index.js
+++ b/index.js
@@ -54,8 +54,10 @@ function cycle() {
       }
 
       client.end(function (err) {
-        console.error('error disconnecting from client');
-        console.dir(err);
+        if (err) {
+          console.error('error disconnecting from client');
+          console.dir(err);
+        }
       });
 
       boost(result.rows);