|
Kevin Smith
hawkeesk8 at yahoo.com
Mon May 24 18:13:30 EDT 2004
Hi,
I believe I may have come across a bug in the
resetting of the timeout in the Session object. I
could not get the session to timeout and tracked down
the problem to inside the __init__() of the
BaseSession class. Should there not be an explicit
save of the session object after the line that reads:
self._accessed = time.time()
This is the last thing performed in the method just
before the random cleanup.
Anyway, I added the following line and now everything
behaves as expected:
self._accessed = time.time()
self.save()
On other notes, I also ran across a bit of a "gotcha."
I set the timeout parameter as a PythonOption. Of
course, when retrieving the value it comes in as a
string. I then unwittingly sent that off as a
parameter to Session.Session(). Only after a lot of
scratching my head I discovered that the timeout
calculation in load() was taking my timeout 'string'
and successfully doing the ">" operation on it but the
result was always False. Could there not be an
explicit cast to float? (of course I later casted to
a float before sending which then led to the
investigation of the aforementioned problem)
Cheers
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
|