Skip to content

Commit

Permalink
proxy 'end' function to stream
Browse files Browse the repository at this point in the history
  • Loading branch information
brianc committed Oct 23, 2012
1 parent 7b1d314 commit d9e2709
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ Context.prototype.waitForDigit = function(timeout, cb) {

Context.prototype.hangup = function(cb) {
this.send('HANGUP\n', cb);
}
};

Context.prototype.end = function() {
this.stream.end();
};

module.exports = Context;
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('Context', function() {
this.context.stream.emit('close', true);
});
});
})
});
});

describe('agi#createServer', function() {
Expand Down

0 comments on commit d9e2709

Please sign in to comment.