mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-08 03:00:20 -04:00
socket: fix Socket#ack
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user