Author: titmuss
Date: Thu Jan 17 04:48:11 2008
New Revision: 1477
URL: http://svn.slimdevices.com?rev=1477&root=Jive&view=rev
Log:
Bug: N/A
Description:
Fix player delete notifications when SC connection has died.
Reduce SC timeout to 60 seconds, down from 5 minutes.
Modified:
trunk/jive/src/pkg/jive/share/jive/slim/Player.lua
trunk/jive/src/pkg/jive/share/jive/slim/SlimServer.lua
trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua
Modified: trunk/jive/src/pkg/jive/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/slim/Player.lua?rev=1477&root=Jive&r1=1476&r2=1477&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/slim/Player.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/slim/Player.lua Thu Jan 17 04:48:11 2008
@@ -202,8 +202,9 @@
currentSong = {}
})
- -- SlimServer notifies of our arrival, so that listener see us in the
SS db when notified, not before
-
+ -- notify of new player
+ jnt:notify('playerNew', obj)
+
return obj
end
@@ -296,6 +297,8 @@
=cut
--]]
function free(self)
+ self.jnt:notify('playerDelete', self)
+
self:offStage()
-- caller has to notify we're gone
end
Modified: trunk/jive/src/pkg/jive/share/jive/slim/SlimServer.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/slim/SlimServer.lua?rev=1477&root=Jive&r1=1476&r2=1477&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/slim/SlimServer.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/slim/SlimServer.lua Thu Jan 17 04:48:11
2008
@@ -145,9 +145,6 @@
player = Player(self, self.jnt, player_info)
self.players[player_info.playerid] = player
-
- -- notify of new player
- self.jnt:notify('playerNew', player)
else
-- update existing players
@@ -155,16 +152,15 @@
end
end
else
- log:warn(self, ": has no players!")
+ log:info(self, ": has no players!")
end
-- any players still in the list are gone...
for k,v in pairs(selfPlayers) do
player = self.players[k]
+ -- wave player bye bye
+ player:free()
self.players[k] = nil
- -- wave player bye bye
- self.jnt:notify('playerDelete', player)
- player:free()
end
end
@@ -260,7 +256,7 @@
--]]
function free(self)
log:debug(self, ":free()")
-
+
-- notify we're gone by caller in SlimServers
-- clear cache
@@ -290,7 +286,7 @@
function connect(self)
- log:warn(self, ":connect()")
+ log:info(self, ":connect()")
-- artwork pool connects on demand
self.comet:start()
@@ -298,14 +294,14 @@
function disconnect(self)
- log:warn(self, ":disconnect()")
+ log:info(self, ":disconnect()")
self.artworkPool:close()
self.comet:disconnect()
end
function reconnect(self)
- log:warn(self, ":reconnect()")
+ log:info(self, ":reconnect()")
self:disconnect()
self:connect()
@@ -453,7 +449,7 @@
-- remove tail entry
local entry = table.remove(self.artworkFetchQueue)
- --log:warn("ARTWORK ID=", entry.key)
+ --log:debug("ARTWORK ID=", entry.key)
local req = RequestHttp(
_getArtworkThumbSink(self, entry.key,
entry.size),
'GET',
Modified: trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua?rev=1477&root=Jive&r1=1476&r2=1477&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua Thu Jan 17 04:48:11
2008
@@ -51,7 +51,7 @@
-- constants
local PORT = 3483 -- port used to discover servers
-local TIMEOUT = 300 -- timeout (in seconds) before removing servers
+local TIMEOUT = 60 -- timeout (in seconds) before removing servers
-- t_source
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins