Author: titmuss
Date: Fri Feb 1 11:40:43 2008
New Revision: 1737
URL: http://svn.slimdevices.com?rev=1737&root=Jive&view=rev
Log:
Bug: 6764
Description:
Timeout on the network sockets should use a monotonic clock, when switching
between servers the time may change.
Modified:
branches/7.0/jive/src/pkg/jive/share/jive/net/NetworkThread.lua
branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua
branches/7.0/jive/src/pkg/jive/share/jive/ui/Task.lua
Modified: branches/7.0/jive/src/pkg/jive/share/jive/net/NetworkThread.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/net/NetworkThread.lua?rev=1737&root=Jive&r1=1736&r2=1737&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/net/NetworkThread.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/net/NetworkThread.lua Fri Feb 1
11:40:43 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: branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua?rev=1737&root=Jive&r1=1736&r2=1737&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua Fri Feb 1
11:40:43 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: branches/7.0/jive/src/pkg/jive/share/jive/ui/Task.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/ui/Task.lua?rev=1737&root=Jive&r1=1736&r2=1737&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/ui/Task.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/ui/Task.lua Fri Feb 1 11:40:43
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