helppokersource - Support: sr #2198, tourneyFinsh: more intelligent...

 
 
Show feedback again

sr #2198: tourneyFinsh: more intelligent handling of PacketPokerTourneyFinish sending

Submitted by:  Bradley M. Kuhn <bkuhn>
Submitted on:  Tue 02 Dec 2008 08:05:42 PM UTC  
 
Category: poker-networkPriority: 5 - Normal
Severity: 2 - MinorStatus: Confirmed
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None
Effort: 0.00

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 02 Dec 2008 08:25:18 PM UTC, comment #1:

Could you describe a use case for TourneyFinish ?

Loic Dachary <loic>
Project Administrator
Tue 02 Dec 2008 08:05:42 PM UTC, original submission:

In http://svn.gna.org/viewcvs/pokersource?view=rev&rev=5107 , proppy committed a reasonable fix for a problem we were experiencing: due to the extra_wait_tourney_finish delay, the jpoker client was getting PacketPokerTourneyFinish() before table destruction, which caused issues. I have some issues with this patch, because it moves PacketPokerTourneyFinish() to being sent only in response to a POLL request (in avatar).

Proppy and I discussed a possible better solution. We were in general agreement that it would be better, but I encouraged him to submit his patch anyway because it was a quick, understandable fix and mine is longer, a bit complicated, and tougher to write good tests for.

Here was my proposal as I wrote it up on IRC:

<bkuhn> The right way to do this is to have tourneyFinished() only send the
packets when it knows all tables have been destroyed. [11:40]
<bkuhn> This is probably harder to debug and test. [11:41]
<bkuhn> But it's not THAT hard [11:42]
<bkuhn> tourney.games should have all the tables still alive in it.
<bkuhn> tourneyFinished() could do a reactor.callLater() [11:43]
<bkuhn> which waits the same delay as the delete table delay.
<bkuhn> and then sees if tourney.games are all gone
<bkuhn> and if so, sends the tourneyfinish packets
<bkuhn> if not, it sleeps another extra_wait_tourney_finish [11:44]
<bkuhn> if it does three extra_wait_tourney_finish and the tables are still
alive, something is really really wrong.
<bkuhn> and we can send Finish() anyway, logging serious errorness

Bradley M. Kuhn <bkuhn>
Project Administrator

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by loic (Posted a comment)
  • -unavailable- added by bkuhn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup