Bug in RingGameLeave?

Report bugs found in Poker Mavens
stevemavens
Posts: 4
Joined: Mon May 11, 2020 11:26 pm

Bug in RingGameLeave?

Post by stevemavens »

RingGameLeave seems to be giving incorrect "Net" information if a player leaves the table in the middle of the hand.

For example, at a heads-up table, both players bought in for 500 chips. Player 1 bet 175 chips and then disconnected in the middle of the hand. When he didn't reconnect, the 175 chips were awarded to Player2. But RingGameLeave gives a Net of 0 for Player1 (see below). I have been able to recreate this reliably; the net does not seem to include the final hand if a player disconnects in the middle of the hand (but only for the player who disconnected).

2020-05-11 21:43:02
Array
(
[Event] => RingGameLeave
[Name] => Test Table
[Player] => Player1
[Amount] => 325
[Net] => 0
[Expired] => No
[Time] => 2020-05-11 21:43:01
[Index] => 918
[Password] => EdEP5HeDGPZwaIHSRsb04
)

2020-05-11 21:42:06
Array
(
[Event] => RingGameLeave
[Name] => Test Table
[Player] => Player2
[Amount] => 675
[Net] => 175
[Expired] => No
[Time] => 2020-05-11 21:42:06
[Index] => 913
[Password] => EdEP5HeDGPZwaIHSRsb04Bv
)
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: Bug in RingGameLeave?

Post by Kent Briggs »

I'll look into it, thanks.
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: Bug in RingGameLeave?

Post by Kent Briggs »

I'm unable to reproduce this (running 6.18). I opened two browser windows and put two players on a hold'em table. Player 1 bet 175 and I then closed his browser window, which put him in disconnect protection mode after player 2 called and later bet. Player 2 wins the 175 and Player 1 sits out for about 2 minutes until the system removed him from the table. Player 2 then leaves the table. The callback file has these two records:

Code: Select all

{"Event":"RingGameLeave","Name":"Ring Game #04","Player":"pm1","Amount":"325","Net":"-175","Expired":"No","Time":"2020-05-13 15:48:29"}
{"Event":"RingGameLeave","Name":"Ring Game #04","Player":"pm2","Amount":"675","Net":"175","Expired":"No","Time":"2020-05-13 15:48:33"}
What are you doing different from me?
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: Bug in RingGameLeave?

Post by Kent Briggs »

Ok, nevermind. If I log that disconnected player back in before the system removes him, it reset his net chips back to 0 because it's a whole new login. That might not be trivial to fix but I'll see what I can do.
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: Bug in RingGameLeave?

Post by Kent Briggs »

Now I can't reproduce it again. I only got it to happen once. If you have some more detailed step by step instructions please let me know. How did you produce the disconnect? Did the player return, if so when exactly? When and how did he leave the table to trigger the callback, etc.
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: Bug in RingGameLeave?

Post by Kent Briggs »

And nevermind again. The word "disconnected" threw me off. The player doesn't disconnect, he just purposely leaves the table in the middle of the hand. That's causing the Net 0.
stevemavens
Posts: 4
Joined: Mon May 11, 2020 11:26 pm

Re: Bug in RingGameLeave?

Post by stevemavens »

Thanks for all the time you're spending on this, Kent. You're right, the player leaves the table first and then disconnects (but the disconnecting part appears not to be relevant).
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: Bug in RingGameLeave?

Post by Kent Briggs »

By the way, the bug does not occur when "Rathole minutes" > 0. That's because the rathole routine was forcing one last net chip calculation so it would carry that over if the player returned during the rat hole period. Apparently I forgot it would also be needed for the callback event. Anyway, I've got the fix coded for the next update.
Kent Briggs
Site Admin
Posts: 5880
Joined: Wed Mar 19, 2008 8:47 pm

Re: Bug in RingGameLeave?

Post by Kent Briggs »

Kent Briggs wrote:By the way, the bug does not occur when "Rathole minutes" > 0.
And on that note, be aware that if the player does come back during the rathole period, the Net carries over and will show again in the RingGamesLeave callback when he leaves again. So if you are summing all these Net fields together you'll need to account for that.
stevemavens
Posts: 4
Joined: Mon May 11, 2020 11:26 pm

Re: Bug in RingGameLeave?

Post by stevemavens »

Thanks Kent, I really appreciate it. And thanks for the warning about the rathole period. -- Steve
Post Reply