Bugzilla – Bug 9960
Comet does not always send /meta/subscribe
Last modified: 2009-07-31 10:31:43 UTC
I have debugged this on Jive, not on the SC side. But this is what I see: Jive sends the connect and subscriptions to SC: { --[[table: 0xb8e758]] { --[[table: 0x939200]] clientId = "55560X74052c556a3741a58e69b3382e2c7914X1226419121Xd4d07ee5", connectionType = "streaming", channel = "/meta/connect", }, { --[[table: 0x7982a8]] clientId = "55560X74052c556a3741a58e69b3382e2c7914X1226419121Xd4d07ee5", subscription = "/55560X74052c556a3741a58e69b3382e2c7914X1226419121Xd4d07ee5/**", channel = "/meta/subscribe", }, { --[[table: 0xb026c0]] id = 1, data = { --[[table: 0x8ee118]] request = { --[[table: 0xb02670]] "", { --[[table: 0x7e1c10]] "serverstatus", 0, 50, "subscribe:60", }, }, response = "/55560X74052c556a3741a58e69b3382e2c7914X1226419121Xd4d07ee5/slim/serverstatus", }, channel = "/slim/subscribe", }, } SC only responds with the serverstatus, the /meta/connect response is missing: 003738:13459 WARN (Comet.lua:780) - Comet {harrypotter} chunk in: 003738:13462 WARN (Comet.lua:784) - ############## /4913019d/slim/serverstatus The debug above is added at the top of _response: _response = function(self, chunk) -- If we have data if not chunk then return end +log:warn(self, " chunk in:") +for i, event in ipairs(chunk) do + log:warn("############## ", event.channel) +end + -- Process each response event for i, event in ipairs(chunk) do This is re-creatable on jive and the desktop squeezeplay. It causes problems with some of the later subscriptions, as the comet state is not correctly updated (to connected). Also it causes jive to do multiple connections to SC, and will slow down the initial connect time.
OK, it looks like the server sends these responses out of order from the original request. The serverstatus comes first, followed by the /meta/connect and /meta/subscribe, and /slim/subscribe ack messages. Is that what you're seeing, or do they not arrive at all?
I think the right solution is for Jive to split this into 2 packets: /meta/connect and /meta/subscribe /slim/subscribe Fixing it in SC is more complicated because you don't always want to send the results of a /slim/subscribe back on the same connection the request was sent in on.
Fixed in r3346. Squeezeplay now only sends the subscriptions after the /meta/(re)connect response.
This bug has been fixed in the 7.3.0 release version of SqueezeCenter! Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already. If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Reduce number of active targets for SC