Author: titmuss
Date: Fri Feb 1 13:56:32 2008
New Revision: 1751
URL: http://svn.slimdevices.com?rev=1751&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r1737): titmuss | 2008-02-01 19:40:43 +0000
Bug: 6764
Description:
Timeout on the network sockets should use a monotonic clock, when switching
between servers the time may change.
Modified:
trunk/ (props changed)
trunk/jive/src/pkg/jive/share/jive/net/NetworkThread.lua
trunk/jive/src/pkg/jive/share/jive/slim/Player.lua
trunk/jive/src/pkg/jive/share/jive/ui/Task.lua
Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Feb 1 13:56:32 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1736
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1737
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/NetworkThread.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/net/NetworkThread.lua?rev=1751&root=Jive&r1=1750&r2=1751&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/net/NetworkThread.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/net/NetworkThread.lua Fri Feb 1
13:56:32 2008
@@ -72,8 +72,8 @@
-- remember the pump, the time and the desired timeout
sockList[sock] = {
task = task,
- lastSeen = socket.gettime(),
- timeout = timeout or 60
+ lastSeen = Framework:getTicks(),
+ timeout = (timeout or 60) * 1000
}
end
@@ -132,7 +132,7 @@
-- we want the second case, the sock is a userdata (implemented
by LuaSocket)
-- we also want the timeout to exist and have expired
if type(v) == "userdata" and t.timeout > 0 and now - t.lastSeen
> t.timeout then
- log:error("network thread timeout for ", v)
+ log:error("network thread timeout for ", t.task)
t.task:addTask("inactivity timeout")
end
end
@@ -146,7 +146,7 @@
local r,w,e = socket.select(self.t_readSocks, self.t_writeSocks,
timeout)
- local now = socket.gettime()
+ local now = Framework:getTicks()
if e then
-- timeout is a normal error for select if there's nothing to
do!
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=1751&root=Jive&r1=1750&r2=1751&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/slim/Player.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/slim/Player.lua Fri Feb 1 13:56:32 2008
@@ -271,7 +271,6 @@
if self.slimServer ~= slimServer then
-- delete from old server
if self.slimServer then
- log:info(self, " delete for ", self.slimServer)
self.slimServer:_deletePlayer(self)
end
Modified: trunk/jive/src/pkg/jive/share/jive/ui/Task.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/jive/ui/Task.lua?rev=1751&root=Jive&r1=1750&r2=1751&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/jive/ui/Task.lua (original)
+++ trunk/jive/src/pkg/jive/share/jive/ui/Task.lua Fri Feb 1 13:56:32 2008
@@ -216,3 +216,20 @@
return entry
end
end
+
+
+function __tostring(self)
+ return "Task(" .. self.name .. ")"
+end
+
+
+--[[
+
+=head1 LICENSE
+
+Copyright 2007 Logitech. All Rights Reserved.
+
+This file is subject to the Logitech Public Source License Version 1.0. Please
see the LICENCE file for details.
+
+=cut
+--]]
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins