Browse files

Merge pull request #219 from dvv/patch-1

acks: automatic for .send and manual for .emit
  • Loading branch information...
2 parents b6177c7 + 8ce05bc commit c5d11cba7a34ca597277d98b101a659d94917250 @rauchg rauchg committed Jun 30, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/namespace.js
View
5 lib/namespace.js
@@ -1,4 +1,3 @@
-
/**
* socket.io
* Copyright(c) 2011 LearnBoost <dev@learnboost.com>
@@ -70,7 +69,7 @@
if ('function' == typeof fn) {
packet.id = ++this.ackPackets;
- packet.ack = fn.length ? 'data' : true;
+ packet.ack = true;
this.acks[packet.id] = fn;
}
@@ -93,7 +92,7 @@
if ('function' == typeof lastArg) {
packet.id = ++this.ackPackets;
- packet.ack = lastArg.length ? 'data' : true;
+ packet.ack = 'data';
this.acks[packet.id] = lastArg;
args = args.slice(0, args.length - 1);
}

0 comments on commit c5d11cb

Please sign in to comment.