diff --git a/README.md b/README.md index 1d54abe3..b3483839 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ completely non-blocking. }; query.on('end') { - client.disconnect(); + client.end(); }; diff --git a/lib/client.js b/lib/client.js index 2a9a50a3..624b137e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -86,7 +86,7 @@ p.writeInt32 = function(buffer, offset, value) { buffer[offset++] = value >>> 0 & 0xFF; }; -p.disconnect = function() { +p.end = function() { var terminationBuffer = new Buffer([88,0,0,0,4]); this.stream.write(terminationBuffer); }; diff --git a/test/integration/password-connection-tests.js b/test/integration/password-connection-tests.js index b2270b1d..1d7fb579 100644 --- a/test/integration/password-connection-tests.js +++ b/test/integration/password-connection-tests.js @@ -18,5 +18,5 @@ query.on('row', function() { }); query.on('end', function() { - client.disconnect(); + client.end(); }); diff --git a/test/integration/simple-query-tests.js b/test/integration/simple-query-tests.js index 89b49aa9..7323914d 100644 --- a/test/integration/simple-query-tests.js +++ b/test/integration/simple-query-tests.js @@ -25,7 +25,7 @@ query.on('row', function(row) { console.log(row); }); query.on('end', function() { - client3.disconnect(); + client3.end(); });