How we fixed a match that froze while your opponent kept scoring
Hi Product Hunt
I'm building Mind Race: live 1v1 math and logic battles in the browser. You and an opponent get the same 10 questions, there's a 90-second clock, and the faster correct answers win.This week a player reported something odd: mid-match his screen froze, but his opponent kept scoring. Our server logs showed no errors at all. His answers simply never arrived.
The cause: on mobile networks, a live connection can die quietly. The browser still says "connected", so the app kept sending answers into nothing.
What we changed:
Heartbeat: if the server goes quiet, the app checks, and reconnects if there's no reply
Answer watchdog: an answer that isn't confirmed within 5 seconds gets re-sent on a fresh connection
Catch-up: after every reconnect, the app asks the server where the match really standsNow it recovers in about 5 seconds, and you'll see "Slow connection re-sending your answer" instead of a frozen screen.
Full debugging story: https://mindrace.in/app/communit...
Question for you: have you played a real-time game on a patchy connection? What made it feel fair (or unfair)? I'd love your ideas before launch
