socket: fix Socket#ack

This commit is contained in:
Guillermo Rauch
2012-12-18 17:20:01 -03:00
parent 22c91d8e49
commit 8a5cb03fcb

View File

@@ -225,10 +225,11 @@ Socket.prototype.onevent = function(packet){
/**
* Produces an ack callback to emit with an event.
*
* @param {Number} packet id
* @api private
*/
Socket.prototype.ack = function(){
Socket.prototype.ack = function(id){
var self = this;
var sent = false;
return function(){
@@ -237,6 +238,7 @@ Socket.prototype.ack = function(){
var args = Array.prototype.slice.call(arguments);
debug('sending ack %j', args);
self.packet({
id: id,
type: parser.ACK,
data: args
});