Author: bklaas
Date: Wed Apr 13 14:03:29 2011
New Revision: 9421
URL: http://svn.slimdevices.com/jive?rev=9421&view=rev
Log:
r50019@DaddyMac (orig r9408): blblack | 2011-04-06 12:25:34 -0500
Comet.lua: rhttp code to set cachedIP from chttp was only present in one of
two cases of _addPendingRequests+send(), presumably due to an earlier
copy+paste and then the cachedIP fix only being applied to one copy. This is
now de-duplicated and the cachedIP fix applies to both cases.
SocketHttp.lua: t_sendResolve state was being executed when sending requests
on an already-connected socket. This results in a spurious DNS request which
updates t_tcp.address for this connection (possibly to a new IP, which is not
the one currently connected to). This in turn is the source of rhttp's
cachedIP, which can lead to chttp+rhttp split to different destinations.
t_sendDequeue now skips over both t_sendResolve and t_sendConnect when already
connected.
Modified:
7.6/trunk/ (props changed)
7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua
Propchange: 7.6/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Wed Apr 13 14:03:29 2011
@@ -14,7 +14,7 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/private-branches/new-alsa:6567
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:8423
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/private-branches/7.5.3-rc:9282
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/trunk:9394
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/trunk:9408
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua?rev=9421&r1=9420&r2=9421&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua (original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua Wed Apr 13
14:03:29 2011
@@ -344,10 +344,12 @@
-- Send any pending subscriptions and requests
-_sendPendingRequests = function(self)
+_sendPendingRequests = function(self, data)
-- add all pending unsub requests, and any others we need to send
- local data = {}
+ if not data then
+ data = {}
+ end
_addPendingRequests(self, data)
-- Only continue if we have some data to send
@@ -760,26 +762,7 @@
table.insert(data, v)
end
- -- Add any other pending requests to the outgoing data
- _addPendingRequests(self, data)
-
- -- Only continue if we have some data to send
- if data[1] then
-
- if log:isDebug() then
- log:debug("Sending pending request(s):")
- debug.dump(data, 5)
- end
-
- local req = CometRequest(
- _getEventSink(self),
- self.uri,
- data
- )
-
- self.rhttp:fetch(req)
- end
-
+ _sendPendingRequests(self, data)
_state(self, CONNECTED)
end
Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua?rev=9421&r1=9420&r2=9421&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua
(original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/net/SocketHttp.lua Wed Apr
13 14:03:29 2011
@@ -181,7 +181,11 @@
if self.t_httpSendRequest then
log:debug(self, " send processing ", self.t_httpSendRequest)
- self:t_nextSendState(true, 't_sendResolve')
+ if self:connected() then
+ self:t_nextSendState(true, 't_sendRequest')
+ else
+ self:t_nextSendState(true, 't_sendResolve')
+ end
return
end
end
@@ -248,14 +252,12 @@
function t_sendConnect(self)
log:debug(self, ":t_sendConnect()")
- if not self:connected() then
- local err = socket.skip(1, self:t_connect())
-
- if err then
- log:error(self, ":t_sendConnect: ", err)
- self:close(err)
- return
- end
+ local err = socket.skip(1, self:t_connect())
+
+ if err then
+ log:error(self, ":t_sendConnect: ", err)
+ self:close(err)
+ return
end
self:t_nextSendState(true, 't_sendRequest')
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins