wsun / multibuzzer

Simple multiplayer buzzer system, e.g. for trivia night or quiz bowl
https://multibuzz.app/
MIT License
74 stars 36 forks source link

Buzzer Button not getting call back from the server #40

Closed StavanAdhyaru closed 2 years ago

StavanAdhyaru commented 2 years ago

Hi, I have run the project on the local server in multiple devices. When I press Buzzer Button around the same time the last button pressed does not change it's colour to black and shows BUZZED in the text, but server does get the click effect and gets the ms deifference.

wsun commented 2 years ago

Hi Stavan, thanks for reaching out! Just to confirm, is this happening on your local server, or are you also observing it happening on the live website?

asheshvagh11 commented 2 years ago

Hi Will, This is also happening on the live website. Thanks!

wsun commented 2 years ago

Do you mind sharing a screen recording of what you're seeing? Just to confirm - it sounds like under certain conditions, you're saying that when you press the buzzer button, the UI does not update (to black and "Buzzed")? It looks like it's continuing to work ok for me, so I'd love to better understand how to reproduce this.

asheshvagh11 commented 2 years ago

https://user-images.githubusercontent.com/46033302/185759957-aff753fe-a0d6-4b78-8ba2-0bf749e4e994.mp4

Please find the attached recording. I have two mobile devices and I tried to click same time. ( Not everytime but 5/10 it happens)

wsun commented 2 years ago

Appreciate you sharing this! I was able to reproduce - I will deploy a quick fix for this.

It looks like this is a race condition when buzzes are very close to each other. When that happens, there is a slight delay on the server sending back game information, so the button state was incorrectly resetting. There may be a slight flash, but with this fix, it should resolve to the correct state.

asheshvagh11 commented 2 years ago

@wsun Thanks for the prompt reply!

wsun commented 2 years ago

Ok, I think my fix in dc366bf should resolve this. I've deployed to the website as well. Thank you again for reporting this!