In this script, if a player bets on a poring and disconnect before the end of the race, his bet stays forever there, and he can't bet again or talk to the NPC (even if his poring wins a race, he doesn't receive the prize, he just can't bet anymore).
Here's the script: