Index: src/squeezeplay/share/jive/slim/SlimServer.lua =================================================================== --- src/squeezeplay/share/jive/slim/SlimServer.lua (revision 8943) +++ src/squeezeplay/share/jive/slim/SlimServer.lua (working copy) @@ -254,6 +254,8 @@ if not self.players[playerId] then self.players[playerId] = Player(self.jnt, playerId) end + + local player = self.players[playerId] -- update player state @@ -259,14 +261,24 @@ local useSequenceNumber = false local isSequenceNumberInSync = true - if self.players[playerId]:isLocal() and player_info.seq_no then + if player:isLocal() and player_info.seq_no then useSequenceNumber = true - if not self.players[playerId]:isSequenceNumberInSync(tonumber(player_info.seq_no)) then + if not player:isSequenceNumberInSync(tonumber(player_info.seq_no)) then isSequenceNumberInSync = false end end - - self.players[playerId]:updatePlayerInfo(self, player_info, useSequenceNumber, isSequenceNumberInSync) + + -- Bug 16295: ignore serverStatus updates with information about the current player + -- because serverStatus from SN can contain out-of-date information (cached query); + -- just rely on (player)status notifications for that information, + -- unless this status indicates a change of server (possibly from none) for the player + -- or the connected status has changed (should be reliable). + if Player:getCurrentPlayer() ~= player + or player:getSlimServer() ~= self + or player:isConnected() ~= (tonumber(player_info.connected) == 1) + then + player:updatePlayerInfo(self, player_info, useSequenceNumber, isSequenceNumberInSync) + end end else log:debug(self, ": has no players!")