From 0882c8da021001487757159e4b7df07b16e0c100 Mon Sep 17 00:00:00 2001 From: Ricky Ng-Adam Date: Fri, 18 Apr 2014 23:30:45 +0800 Subject: [PATCH] from ended to end --- lib/index.js | 2 +- test/integration/connection-pool/ending-pool-tests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index dd6e693b5..b78e4caa9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -28,7 +28,7 @@ PG.prototype.end = function() { pool.destroyAllNow(function() { count--; if(count === 0) { - self.emit('ended'); + self.emit('end'); } }); }); diff --git a/test/integration/connection-pool/ending-pool-tests.js b/test/integration/connection-pool/ending-pool-tests.js index f6026a5c0..83f4b1bc2 100644 --- a/test/integration/connection-pool/ending-pool-tests.js +++ b/test/integration/connection-pool/ending-pool-tests.js @@ -5,7 +5,7 @@ test('disconnects', function() { var sink = new helper.Sink(4, function() { called = true; var eventSink = new helper.Sink(1, function() {}); - helper.pg.on('ended', function() { + helper.pg.on('end', function() { eventSink.add(); });