On Thu, 2009-09-10 at 19:31 +0200, Loic Dachary wrote: > Hi, > > I applied the following patch to jpoker (accidentaly with the > TourneyStart packet handling that will show as non covered lines in > the test). I believe it fixes the issue johan had when trying the > client with the long poll implementation.
Hi,
Nice patch,
I spotted another issue with server side implementation,
If the avatar is not connected to any tables or tourneys,
PacketPokerPollReturn expire the avatar session *before*,
PacketPokerPoll returns, thus causes the following Traceback:
PokerResource: *ERROR* (x-forwarded-for:127.0.0.1) Traceback (most recent call
last):
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 328,
in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "../pokernetwork/pokersite.py", line 229, in <lambda>
deferred.addCallback(lambda result: self.deferRender(request, jsonp,
packet, data))
File "../pokernetwork/pokersite.py", line 271, in deferRender
d.addCallbacks(render, processingFailed)
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 186,
in addCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 328,
in _runCallbacks
self.result = callback(self.result, *args, **kw)
File "../pokernetwork/pokersite.py", line 245, in render
session.site.updateSession(session)
File "../pokernetwork/pokersite.py", line 450, in updateSession
serial = session.avatar.getSerial()
exceptions.AttributeError: Session instance has no attribute 'avatar'
As we discussed with Loic, one fix would be not to do anything on the
session when handling a PacketPokerLongPollReturn.
I'll work on this, and do more testing tomorrow.
Nice to see the long implementation is taking shape,
Thanks you Loic, you made an awesome job into drafting and splitting
this in bite-size tasks.
--
Johan Euphrosine <[email protected]>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Pokersource-users mailing list [email protected] https://mail.gna.org/listinfo/pokersource-users
