Permalink
Browse files

acks: automatic for .send and manual for .emit

  • Loading branch information...
1 parent 27be7ac commit 8ce05bc68c2d9081cfdaf88f91c8a44e05cbc016 @dvv dvv committed Jun 29, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/namespace.js
View
@@ -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 8ce05bc

Please sign in to comment.