summaryrefslogtreecommitdiff
path: root/plugins/Orbited/orbitedupdater.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Orbited/orbitedupdater.js')
-rw-r--r--plugins/Orbited/orbitedupdater.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/Orbited/orbitedupdater.js b/plugins/Orbited/orbitedupdater.js
index d70f4a4fd..8c5ab3b73 100644
--- a/plugins/Orbited/orbitedupdater.js
+++ b/plugins/Orbited/orbitedupdater.js
@@ -9,13 +9,16 @@ var OrbitedUpdater = function()
// set up stomp client.
stomp = new STOMPClient();
- stomp.connect(server, port, username, password);
- stomp.subscribe(timeline);
-
stomp.onmessageframe = function(frame) {
RealtimeUpdate.receive(JSON.parse(frame.body));
};
- };
+
+ stomp.onconnectedframe = function() {
+ stomp.subscribe(timeline);
+ }
+
+ stomp.connect(server, port, username, password);
+ }
}
}();