Skip to content

Commit

Permalink
Added Transport#discard. Mostly useful for when request/response cycl…
Browse files Browse the repository at this point in the history
…es are load

balanced into different nodes.
  • Loading branch information
rauchg committed Jun 27, 2011
1 parent f736302 commit 733569a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,13 @@ Transport.prototype.end = function (reason) {
* @api public
*/

Transport.prototype.pause = function () {
this.paused = true;
Transport.prototype.discard = function () {
this.log.debug('discarding transport');
this.discarded = true;
this.clearTimeouts();
this.clearHandlers();
this.buffer = [];

return this;
};

Expand Down

0 comments on commit 733569a

Please sign in to comment.