Merge pull request #570 from brianc/pause_resume_drain

remove pause/resumeDrain functions from native code as discussed in issue #515
This commit is contained in:
Brian C 2014-04-18 09:41:55 -05:00
commit c1d3a14a82

View File

@ -118,12 +118,7 @@ Connection.prototype._pulseQueryQueue = function(initialConnection) {
var query = this._queryQueue.shift();
if(!query) {
if(!initialConnection) {
//TODO remove all the pause-drain stuff for v1.0
if(this._drainPaused) {
this._drainPaused++;
} else {
this.emit('drain');
}
this.emit('drain');
}
return;
}
@ -145,19 +140,6 @@ Connection.prototype._pulseQueryQueue = function(initialConnection) {
}
};
//TODO remove all the pause-drain stuff for v1.0
Connection.prototype.pauseDrain = function() {
this._drainPaused = 1;
};
//TODO remove all the pause-drain stuff for v1.0
Connection.prototype.resumeDrain = function() {
if(this._drainPaused > 1) {
this.emit('drain');
}
this._drainPaused = 0;
};
Connection.prototype.sendCopyFail = function(msg) {
this.endCopyFrom(msg);
};