summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Norris <trev.norris@gmail.com>2014-01-21 09:22:00 -0800
committerTrevor Norris <trev.norris@gmail.com>2014-01-21 10:20:22 -0800
commitbf08ac462e2c706aa4a5da7e8363f6e66c5d18c9 (patch)
tree4ed362745610562de6aac9080566debc72d15591
parent60fcc11be2562306f8961ad6c257959822578823 (diff)
downloadnode-bf08ac462e2c706aa4a5da7e8363f6e66c5d18c9.tar.gz
node: compare AsyncListener instances, not uid's
Now that process.createAsyncListener() returns a unique object instance it is no longer necessary to compare the uid's of the objects. Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
-rw-r--r--src/node.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node.js b/src/node.js
index 6599a2ae7..31c0e1b82 100644
--- a/src/node.js
+++ b/src/node.js
@@ -564,7 +564,7 @@
var inQueue = false;
// The asyncQueue will be small. Probably always <= 3 items.
for (var i = 0; i < asyncQueue.length; i++) {
- if (callbacks.uid === asyncQueue[i].uid) {
+ if (callbacks === asyncQueue[i]) {
inQueue = true;
break;
}
@@ -585,7 +585,7 @@
if (asyncQueue) {
for (i = 0; i < asyncQueue.length; i++) {
- if (obj.uid === asyncQueue[i].uid) {
+ if (obj === asyncQueue[i]) {
asyncQueue.splice(i, 1);
break;
}
@@ -597,7 +597,7 @@
if (asyncStack[i] === undefined)
continue;
for (j = 0; j < asyncStack[i].length; j++) {
- if (obj.uid === asyncStack[i][j].uid) {
+ if (obj === asyncStack[i][j]) {
asyncStack[i].splice(j, 1);
break;
}