Fix scoping of state meant to be shared across all handlers

This commit is contained in:
Ole André Vadla Ravnås
2015-03-01 15:58:37 +01:00
parent 59107bab70
commit ef8145cdd4
+1 -1
View File
@@ -175,6 +175,7 @@ var started = new Date();
var pending = [];
var timer = null;
var handlers = {};
var state = {};
function onStanza(stanza) {
if (stanza.to === "/targets") {
if (stanza.name === '+add') {
@@ -205,7 +206,6 @@ function add(targets) {
}
});
}
var state = {};
pending.push(function attachToTarget() {
Interceptor.attach(ptr(targetAddress), {