Author: titmuss
Date: Sun Feb 10 14:45:51 2008
New Revision: 1888
URL: http://svn.slimdevices.com?rev=1888&root=Jive&view=rev
Log:
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:
branches/7.0/jive/src/pkg/jive/share/jive/net/Comet.lua
branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServers.lua
Modified: branches/7.0/jive/src/pkg/jive/share/jive/net/Comet.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/net/Comet.lua?rev=1888&root=Jive&r1=1887&r2=1888&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/net/Comet.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/net/Comet.lua Sun Feb 10 14:45:51
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: branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServers.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServers.lua?rev=1888&root=Jive&r1=1887&r2=1888&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServers.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServers.lua Sun Feb 10
14:45:51 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