Author: titmuss
Date: Sun Feb 10 16:34:23 2008
New Revision: 1899
URL: http://svn.slimdevices.com?rev=1899&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r1888): titmuss | 2008-02-10 22:45:51 +0000
Bug: 6580
Description:
Force a reconnection to SqueezeCenter when the network configuration changes
(for
example after a resume).
Fixed a couple of references to self.active in Comet that were missed during
refactoring.
Modified:
trunk/ (props changed)
trunk/jive/src/pkg/jive/share/jive/net/Comet.lua
trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua
Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Sun Feb 10 16:34:23 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1887
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1888
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified: trunk/jive/src/pkg/jive/share/jive/net/Comet.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/net/Comet.lua?rev=1899&root=Jive&r1=1898&r2=1899&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/net/Comet.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/net/Comet.lua Sun Feb 10 16:34:23 2008
@@ -209,9 +209,13 @@
function notify_networkConnected(self)
- if self.active == "connected" then
+ if self.state == CONNECTING or self.state == CONNECTED then
log:info(self, ": Got networkConnected event, will try to
reconnect")
- return _handleAdvice(self)
+
+ -- Force disconnection, and reconnect
+ _state(self, UNCONNECTED)
+ self:connect()
+
else
log:debug(self, ": Got networkConnected event, but not
currently connected")
end
@@ -359,7 +363,7 @@
self.reqid = id + 1
-- Send immediately unless we're batching queries
- if self.active ~= CONNECTED or self.batch ~= 0 then
+ if self.state ~= CONNECTED or self.batch ~= 0 then
return
end
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=1899&root=Jive&r1=1898&r2=1899&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/slim/SlimServers.lua Sun Feb 10 16:34:23
2008
@@ -465,10 +465,10 @@
-- restart discovery on new network
function notify_networkConnected(self)
log:info("network connected")
- self:discover()
-- force reconnection to all servers if we don't have a player
if not self.currentPlayer then
+ self:discover()
self:connect()
end
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins