diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-15 15:31:57 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-15 15:31:57 -0400 |
commit | 5b081893a5b7281683b5e78090f754cd50009363 (patch) | |
tree | aa0b120084aee1ec4ac179c19cbc934d0282c71a | |
parent | 1ae7357340b588dd16597527ee038b39e31489d9 (diff) |
better callback functions for comet plugin
-rw-r--r-- | plugins/Comet/cometupdate.js | 4 |
1 files changed, 2 insertions, 2 deletions
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(); } ); } } }(); |