From 5b081893a5b7281683b5e78090f754cd50009363 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 15 Jul 2009 15:31:57 -0400 Subject: better callback functions for comet plugin --- plugins/Comet/cometupdate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/Comet') diff --git a/plugins/Comet/cometupdate.js b/plugins/Comet/cometupdate.js index 432778c19..72cca004b 100644 --- a/plugins/Comet/cometupdate.js +++ b/plugins/Comet/cometupdate.js @@ -22,8 +22,8 @@ var CometUpdate = function() _favorurl = favorurl; _replyurl = replyurl; _deleteurl = deleteurl; - _cometd.subscribe(timeline, RealtimeUpdater.receive); - $(window).unload(leave); + _cometd.subscribe(timeline, function(message) { RealtimeUpdate.receive(message.data) }); + $(window).unload(function() { _cometd.disconnect(); } ); } } }(); -- cgit v1.2.3-54-g00ecf