call EventEmmiter constructor on native Connection

this allows to preserve an active domain on switches in libpq
This commit is contained in:
Andrey Popp 2013-05-20 18:31:55 +04:00
parent fddf0546d0
commit 4458e69285

View File

@ -155,6 +155,7 @@ Connection.prototype.sendCopyFail = function(msg) {
var clientBuilder = function(config) {
config = config || {};
var connection = new Connection();
EventEmitter.call(connection);
connection._queryQueue = [];
connection._namedQueries = {};
connection._activeQuery = null;