dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit de623b4401e9a688df4f731d792eace572441821
parent 47ea3d3268208f3e3029d3fd010afe19243cef2b
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed,  6 Dec 2023 06:01:52 -0500

fix

Diffstat:
Mpkg/web/handlers/poker/poker.go | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkg/web/handlers/poker/poker.go b/pkg/web/handlers/poker/poker.go @@ -615,10 +615,6 @@ func (g *PokerGame) Deal(roomID string) { if !g.IsGameOver.Load() { fmt.Println("game already ongoing") return - } else { - g.IsGameOver.Store(false) - PokerPubSub.Pub(roomTopic, ResetCardsEvent{}) - time.Sleep(time.Second) } } if g.CountSeated() < 2 { @@ -626,6 +622,10 @@ func (g *PokerGame) Deal(roomID string) { return } + g.IsGameOver.Store(false) + PokerPubSub.Pub(roomTopic, ResetCardsEvent{}) + time.Sleep(time.Second) + g.Ongoing = NewOngoing(g) go dealerThread(g, roomID)